Generic Programming, Concepts, and Compile-Time Type Traits
Master compile-time generic meta-programming: function/class templates, template specialization, C++20 Concepts, and construct Project 2: Generic Matrix Tensor.
Class design and operator overloading
Command of generic programming, template specialization, compile-time type traits, and C++20 Concepts.
Read in order, or jump to what you need.
Every lesson builds on the one before it. Open any lesson to read the explanation, run the examples, and try the practice challenges.
- 06.01Template Fundamentals: Instantiation, Type Deduction, and Two-Phase Lookup4 min
Deconstruct template compilation: implicit instantiation, template argument deduction (CTAD), non-type template parameters (NTTP), and two-phase name lookup.
- 06.02Template Specialization, SFINAE, and std::enable_if4 min
Explore advanced generic techniques: full and partial template specialization, SFINAE (Substitution Failure Is Not An Error), and compile-time type introspection.
- 06.03C++20 Concepts, Constraints, and Requires Clauses4 min
Revolutionize generic C++ with C++20 Concepts: defining type constraints, atomic requires clauses, concept composition, and readable compiler diagnostics.
- 06.04Guided Project 2: High-Performance Generic Matrix & Tensor Math LibraryProject4 min
Engineer a high-performance generic Matrix math engine utilizing C++20 Concepts, non-type template parameters (NTTP), cache-friendly row-major storage, and SIMD-friendly vector operations.
Ready to move on?
Deliver Project 2: High-Performance Generic Matrix & Tensor Math Library.
Open the module self-check