C++ Library Extensions 2022.12.09
To help learn modern C++ programming
C++ Library Extensions

Why C++ Library Extensions? - By Thomas Kim

Learning modern C++ programming is a lot challenging for both beginners and intermediate-level C++ programmers. They say new C++ Standard will be released every other 3 years. Every each iteration of new C++ Standard is different from its predecessors. For instance, the C++11 Standard is quite different from the C++17 Standard, and the C++20 Standard (slated to be released in the year 2020) will be very different from the C++17 Standard.

Keeping abreast with the new C++ Standard is a lot burdensome for most C++ programmers. Through this series of videos I hope to help my audience learn Modern C++ programming with less efforts.

Download Complete Source Code and Thomas Kim's Contact

C++ Developer's Environment

These C++ Library Extensions are meant to be used on Windows operating system using the latest iteration of Microsoft Visual Studio 2017 or above, GNU GCC/g++ version 8.0 or above, clang++ version 8.0 or above. In case of GNU GCC/g++ and clang++ compiler, we will use UNIX or LINUX-like environment using MSYS2-64bit on Windows. For details about setting up the C++ Developer's Environment, please refer to the following list of videos:

  1. YouTube LogoHow to Install C++ Compiler on Windows (Microsoft Visual Studio 2019)
    • how to install Microsoft Visual Studio 2019
    • how to install Visual Studio Code
    • how to create command prompt
  2. YouTube LogoHow to Install Intel C++ Compiler or Parallel Studio XE on Windows
  3. YouTube LogoHow to Remove and Reinstall GNU g++ over msys2/mingw on Windows
    • how to download and install MSYS2
    • how to download and install GNU GCC/g++
    • how to download and install Thread Building Block
    • how to download and install clang++
  4. YouTube LogoHow to Update GNU g++/clang++ over msys2/mingw on Windows.
    • how to Update GNU g++/clang++ over MSYS2/MINGW64
    • how to install Thread Building Block
  5. YouTube LogoHow to Install Doxygen on Windows
    • how to download and install ghostscript
    • how to download and install HTML Help Workshop
    • how to download and install GraphViz
    • how to download and install MikTeX (or LaTeX)
    • how to download and install Doxygen
  6. YouTube LogoMarkdown for Absolute Beginners using Visual Studio Code
    • how to add Markdown extensions for Visual Studio Code
    • how to use these extensions to create Markdown (.md files) in Visual Studio Code
  7. YouTube LogoHow to Use Doxygen to Create Technical Documentations on Windows
    We will learn
    • How to create Technical Documentation using Doxygen

Setting System Environment Variables for Microsoft Visual C++, GNU GCC/g++, clang++

  1. YouTube LogoIntel Threading Building Blocks with Visual Studio 2017 / 2019 IDE
    We will learn how to install Intel Threading Building Blocks on Windows, and make system environment variable settings for use with Visual Studio 2017 / 2019 IDE.
  2. YouTube LogoThreading Building Blocks, Visual C++ / GNU g++ / clang++ on Command Line
    We will install Intel Threading Building Blocks on Windows and learn how to make system environment settings for command line compilation using Microsoft Visual C++, GNU g++ / clang++ on Windows.

Episodes

  1. YouTube LogoC++2a Standard: Parallel Algorithm (001)
    C++2a is around the corner. In this video, we will peep into the future C++ Standard.
  2. YouTube LogoC++2a Standard: Random Numbers and Stopwatch (002)
    We learn how to generate random numbers and use stopwatch to test performance.
  3. YouTube LogoC++2a Standard: C++ Compiler Comparison for Parallel Algorithm (003)
    We will compare C++ Compilers for Parallel Algorithm, and learn how to use GNU g++ Parallel Algorithm.
  4. YouTube LogoC++2a Standard: Variadics and Parameter Pack Expansion (004)
    We will learn how to use a variadic template,template parameter packs expansion, fold expression, if constexpr, and variadic macros in modern C++ language.
  5. YouTube LogoC++2a Standard: C++ Debugging Technique 1/N (005)
    We will learn how to use Tpf_ThrowDebugException() macro for debugging C++ programming.
  6. YouTube LogoC++2a Standard: C++ Debugging Technique 2/N (006)
    We will learn how to derive a class from C++ Standard correctly, and create a debug_exception class and Tpf_ThrowDebugException() macro for debugging in C++ programming.
  7. YouTube LogoC++2a Standard: Overflow and Division By Zero in Integer Arithmetic (007)
    We will learn how to detect and/or deal with overflow and division by zero in integer arithmetic.
  8. YouTube LogoC++2a Standard: Error Handling in Floating-Point Arithmetic (008)
    We will learn how to deal with Floating-Point Arithmetic Failure.
  9. YouTube LogoC++2a Standard: Multiple Threads Synchronization (009)
    We will use std::async, std::future, std::mutex, std::unique_lock, std::condition_variable, std::atomic, std::system_error, std::lauch:async
  10. YouTube LogoC++2a Standard: (Threading 01) Thread Functions (010)
    We will learn how to create Thread Functions.
  11. YouTube LogoC++2a Standard: (Threading 02) Inter-Thread Communication (011)
    We will learn How to Properly Pass Parameters to the Thread Functions.
  12. YouTube LogoC++2a Standard: (Threading 03) Last Resort Multithread Recursion (012)
    We will learn How to use multiple threads with recursive function calls.
  13. YouTube LogoC++2a Standard: Alias for Template Function and Function with noexcept (013)
    We will learn How to create alias for template functions, also how to test if a function is specified with the keyword noexcept.
  14. YouTube LogoC++2a Standard: Member Initialization Sequence (014)
    We will learn about the member initialization sequence.
    In the next episode, we will learn the consequences of the exception leaks from the C++ constructors such that we can prepare ourselves for exceptional situations.
  15. YouTube LogoC++2a Standard: How to Cope With Exception Leaks from the C++ Constructors (015)
    we will learn the consequences of the exception leaks from the C++ constructors such that we can prepare ourselves for exceptional situations.
    We will also learn about function-try block for exception handling.
  16. YouTube LogoC++2a Standard: (Threading 04) Lambda init-capture for Inter-Thread Communication (016)
    When our algorithm is more complex, using C++ Standard Parallel Algorithm or OPENMP (or Microsoft Parallel Pattern Library, or Intel's Threading Building Block) can be a challenge. In such cases, we can use init-capture for lambda with specifier mutable to parallelize our algorithm.init-capture for lambda was introduced to C++14 Standard. We will also learn how to create multiple threads dynamically at runtime. We will also learn how to maintain a constant number of threads while our thread functions run.
  17. YouTube LogoC++2a Standard: Sequential Quick Sort and Optimization Technique (017)
    We will learn about Sequential Quick Sort, and some C++ optimization technique using std::move and std::make_move_iterator. It might be a little bit challenging for you, but as I said, don't despair, don't get bogged down, BUT COMMIT IT TO YOUR MEMORY, and come back to it again later.
  18. YouTube LogoC++2a Standard: (Threading 05) Passing Reference to Thread Functions (018)
    How to pass a reference to thread functions and how to use std::ref() and std::reference_wrappper, and how to implement them.
  19. YouTube LogoC++2a Standard: (Threading 06) std::promise, std::future, shared state (019)
    If we declare an instance of std::promise, then std::promise dynamically allocates some memory on the free-store or is called heap memory. This dynamically allocated memory by std::promise is shared among different threads. std::promise has a member function that returns std::future.
  20. YouTube LogoC++2a Standard: Copy Elision and Named Return Value Optimization (020)
    We will learn about Copy Elision and Named Return Value Optimization.
  21. YouTube LogoC++2a Standard: Move Semantic and Dynamic Array (021)
    We will learn about Move Semantic by implementing dynamic array. We will also learn about .emplace(), .emplace_back(), .emplace_front().
  22. YouTube LogoC++2a Standard: How to Integrate Iterators to the Custom Class (022)
    We will learn how to use the keyword explicit and how to integrate iterators to our custom C++ class.
  23. YouTube LogoC++2a Standard: How to Apply Class Invariant to Our Custom Class Design(023)
    What is assumed to be true for a class is called "class invariant" or simply "invariant." It is the job of a constructor to establish the invariant for its class (so that the member functions can rely on it) and for the member functions to make sure that the invariant holds when they exit. The notion of invariants is central to the design of classes, and preconditions serve a similar role in the design of functions.
  24. YouTube LogoC++2a Standard: Optimized Dynamic Array in C++ (024)
    We will learn about POD or Plain Old Data Type in C++. We will also learn about if constexpr, std::is_pod_v, alignas, _aligned_malloc, _aligned_free
  25. YouTube LogoC++2a Standard: Partial Types and Member Templates (025)
    We will learn about partial types, member templates such as s template member types, template member class, template friend class, template non-static member function, static template member functions.
  26. YouTube LogoC++2a Standard: std::shared_ptr and std::weak_ptr 1/N (026)
    We will learn basics of std::shared_ptr and std::weak_ptr.
    Download Source Code: http://www.talkplayfun.com/download/cpp_extension/SharedPtr-01-Solution.zip
  27. YouTube LogoC++2a Standard: std::shared_ptr and std::weak_ptr 2/N (027)
    We will learn more about std::shared_ptr and std::weak_ptr.
    Download Source Code: http://www.talkplayfun.com/download/cpp_extension/SharedPtr-02-Solution.zip
  28. YouTube LogoC++2a Standard: Cyclic References, shared_ptr, weak_ptr 3/N (028)
    We will learn the causes of Cyclic or Circular References related to shared_ptr and how to resolve it using weak_ptr.
    Download Source Code: http://www.talkplayfun.com/download/cpp_extension/SharedPtr-03-Solution.zip
  29. YouTube LogoC++2a Standard: How to Implement shared_ptr and weak_ptr 4/N (029)
    We will learn how to implement std::shared_ptr and std::weak_ptr.
    Download Source Code: http://www.talkplayfun.com/download/cpp_extension/SharedPtr-04-Solution.zip
  30. YouTube LogoC++2a Standard: Parallel Execution Policy and Parallel Algorithm (030)
    We will learn about the Parallel Execution Policy.
  31. YouTube LogoC++2a Standard: Correctly Understanding Modern C++ Language (031)
    We will learn how to make best use of modern C++ language. We will have deeper understanding of Named Return Value Optimization,and how it can help us improve our C++ code.
  32. YouTube LogoC++2a Standard: C++ Coroutines in Action 1/N (032)
    Coroutines will be introduced to C++20 Standard. We will learn about the basics of the coroutines.
  33. YouTube LogoC++2a Standard: C++ Coroutines in Action 2/N (033)
    We will learn about co_return expr, co_return, co_yield expr, co_await, awaitable, awaiter types for coroutines.
  34. YouTube LogoC++2a Standard: Parallel Algorithm and Exception Safety (034)
    We will learn about Exception Safety for Parallel Algorithm.
  35. YouTube LogoC++2a Standard: Parallel Algorithm and Synchronization (035)
    We will learn about multithread synchronization for Parallel Algorithm.
  36. YouTube LogoC++2a Standard: Parallel Algorithm, Threading Building Block, Parallel Pattern Library (036)
    We will compare C++ Standard Parallel Algorithm, Intel's Threading Building Block, and Microsoft's Parallel Pattern Library. We will learn how to use parallel_for.
  37. YouTube LogoC++2a Standard: Advanced Type Functions 1/N (037)
    We will learn how to implement make_vector, make_variants, make_container, and reverse ranged-based for loops.
  38. YouTube LogoC++2a Standard: Advanced Type Functions 2/N (038)
    We will learn how to create make_variants() function, type list, unique_types_t.
  39. YouTube LogoC++2a Standard: Fundamentals of C++ Template Metaprogramming 1/N (039)
    We will learn how to use tpf::reverse() function for reverse range-based for loop. We will also learn how to use Tpf_GetTypeName(), Tpf_GetTypeCategory(), and how these can help us build better C++ programs.
  40. YouTube LogoC++2a Standard: Placement Operator New and Delete (040)
    We will learn how to use placement operator new and delete.
  41. YouTube LogoC++2a Standard: Fundamentals of C++ Template Metaprogramming 2/N (041)
    We will learn how to create make_variants() function, type list, unique_types_t.
  42. YouTube LogoC++2a Standard: Constant Expression vs. Compile-Time Expression (042)
    We will learn how to create make_variants() function, type list, unique_types_t.
  43. YouTube LogoC++2a Standard: C++ Object Ownership, Lifetime, and Move Semantic 1/2 (043)
    With C++11 Standard, the concept of move semantic was introduced to C++ language. With move semantic, the concept of object ownership became much more important.
  44. YouTube LogoA little math won't hurt you: Pascal's Triangle (Combinations 1/N)
    We will learn about Pascal's Triangle. Though this formula is not efficient for computation, it can help us solve lots of problems analytically.
  45. YouTube LogoC++2a Standard: Functional Programming in C++ and Non-Type Template Parameters (044)
    We will learn about functional programming paradigm.
  46. YouTube LogoC++2a Standard: Turning Mathematics into C++ Algorithm (045)
    We will learn how to convert mathematical ideas into a working Algorithm.
  47. YouTube LogoC++2a Standard: Problem Solving Strategy - Enumerate Permutations (046)
    In this episode, we will enumerate permutations with the simplest method that I know of, then we can improve its performance later.
  48. YouTube LogoIntel Threading Building Blocks with Visual Studio 2017 / 2019 IDE
    We will learn how to install Intel Threading Building Blocks on Windows, and make system environment variable settings for use with Visual Studio 2017 / 2019 IDE.
  49. YouTube LogoThreading Building Blocks, Visual C++ / GNU g++ / clang++ on Command Line
    We will install Intel Threading Building Blocks on Windows and learn how to make system environment settings for command line compilation using Microsoft Visual C++, GNU g++ and clang++ on Windows.
  50. YouTube LogoC++2a Standard: Binary Tree and Graphviz(048)
    When we create an advanced data structure, we need a tool that enables us to visualize our data structure. For such purpose, we will use graphviz for our development.
  51. YouTube LogoC++2a Standard: Binary Tree in C++ #1 (049)
    We will learn how to implement a binary tree in C++.
  52. YouTube LogoC++2a Standard: Binary Tree in C++ #2 (050)
    We will learn how to search for a node in a binary tree. We will also learn how to generate the graphic representation of a binary tree using graphviz.
  53. YouTube LogoC++2a Standard: Binary Tree in C++ #3 (051)
    We will learn how to calculate the height of a node of a binary tree, or the height of a binary tree, or binary tree height. This technique will prove quite useful for the implementation of AVL tree.
  54. YouTube LogoC++2a Standard: Binary Tree in C++ #4 (052)
    We will find the successor and the predecessor of a node of a binary tree.
  55. YouTube LogoC++2a Standard: Binary Tree in C++ #5 (053)
    How to remove a node from a binary tree. We will remove the root node of a binary tree.
  56. YouTube LogoC++2a Standard: Binary Tree in C++ #6 (054)
    We will learn how to remove non-root nodes and leaf nodes from a binary tree.
  57. YouTube LogoC++2a Standard: Binary Tree in C++ #7 (055)
    We will learn how to implement find or search function for Binary Search Tree.
  58. YouTube LogoC++2a Standard: Binary Tree in C++ #8 (056)
    We will learn how to find the minimum and maximum of a Binary Search Tree.
  59. YouTube LogoC++2a Standard: Binary Tree in C++ #9 (057)
    We will implement the nearest left parent and nearest right parent algorithm for binary search tree.
  60. YouTube LogoC++2a Standard: Binary Tree in C++ (Last Episode) #10 (058)
    The Last Episode for Binary Tree in C++.