Modern C++ Idioms

Mateusz Pusz

1-day-workshop
beginner
intermediate
10:00-19:00, Tuesday, 27th June 2023

C++ is no longer C with classes, and it never was just an Object-Oriented language. C++ is a general-purpose programming language. It has imperative, object-oriented, and generic programming features while also providing facilities for low-level memory manipulation. If used correctly, it provides hard-to-beat performance. Such usage requires a good knowledge of C++ templates and Modern C++ Idioms, which are much different from commonly known design patterns popularized by the GoF book and invented to handle common use cases in pure OO languages like Java or C#.

What you will learn: During the workshop, we will refresh and broaden our knowledge about C++ templates and will learn Modern C++ Idioms like Niebloid, CRTP, Type Erasure, EBO, and many more. Crafting those skills will allow us to build powerful tools that are useful in the everyday work of every C++ developer.

Experience required: In order to be able to follow the workshop, you should be current with C++ and have some recent experience with writing simple C++ templates.

Environment: A laptop with a web browser and access to the Internet. All hands-on exercises will be implemented using Compiler Explorer.



  1. C++ Basics in a nutshell
  2. C++ Types
  3. Value Categories
  4. Name Lookup
  5. Swap
  6. Range-based for loop
  7. Special Member Functions
  8. Exception Safety
  9. C++ Templates in a nutshell
  10. C++ template definition
  11. Template parameters
  12. Template specialization
  13. Modern C++ Idioms
  14. Non-Movable
  15. RAII
  16. Copy-and-swap
  17. Smart Pointer
  18. type_identity
  19. Type Traits
  20. Tag dispatch
  21. Policy-based design
  22. EBO
  23. Type Erasure
  24. SOO
  25. Copy-on-write
  26. CRTP
  27. Barton-Nackman Trick
  28. Singleton
  29. Customization point object (Niebloid)
  30. Mixin
idioms
templates
Book now

Mateusz Pusz