C++ – Metaprogramming and High-Performance Applications (CPP5)
Programming, C, C++
Since C++20, concepts simplify templates and type parameters. This enables replacing virtual methods and heavy OOP with designs focused on performance and predictable latency, important for embedded and real-time systems.
C++26 brings compile-time reflection to express metaprogramming more succinctly, while current standards already provide many library tools to adapt. The course covers C++20/23/26 with examples using constexpr and templates.
Location, current course term
Contact us
The course:
Hide detail
-
Metaprogramming in C++20 and C++23
-
Creating high-performance, generic code
-
Enabling maximum compiler-driven optimization
-
Clearer and more maintainable designs than before
-
Programming with templates
-
Parametric data structures
-
Generic algorithms and helper types
-
Static type checking and safety
-
Template specialization
-
Special handling for particular cases
-
Specialization via tagging and policy classes
-
Metafunctions and compile-time computations
-
Constraining type parameters
-
Documenting requirements on types
-
SFINAE and programming with type traits
-
Explicit constraints using concepts
-
Easier work with templates
-
Shorter function template syntaxes
-
Deducing this and perfect forwarding
-
CTAD and omitting explicit type parameters
-
Combining OOP and templates
-
Using inheritance without virtual methods
-
Augmenting functionality with CRTP
-
Type erasure with templates and inheritance
-
Variadic templates
-
Support for a variable number of parameters
-
Expressions based on parameter packs
-
Techniques using multiple inheritance patterns
-
Header-only libraries
-
Modern role of the inline keyword
-
ODR (one-definition rule) and how it behaves
-
Interaction with templates and class code
-
Metaprogramming beyond templates
-
Compile-time evaluation patterns
-
Keywords constexpr and consteval
-
if constexpr, if consteval and static_assert()
-
Combining constexpr and templates
-
Type-based branching at compile time
-
Simplifying certain template patterns
-
Constexpr function and variable templates
-
Template library design
-
Methods vs free (non-member) functions
-
Argument-dependent lookup (ADL)
-
Customization points for extensibility
-
Implementing generic templates
-
Specialized smart pointer implementations
-
Custom container types
-
Data structures without dynamic allocation
-
Bonus: Reflection in C++26
-
Type and variable introspection facilities
-
Embedding metadata into code
-
Practical applications of reflection
-
Assumed knowledge:
-
Good knowledge of programming in C++.
-
Recommended previous course:
-
C++ – Practical Programming for Advanced Developers (CPP2)
-
Recommended subsequent course:
-
C++ – Design Patterns and Idioms (CPP3)
-
Schedule:
-
3 days (9:00 AM - 5:00 PM )
-
Language:
-