Metaprogramming: From Templates to Concepts
summary
Shows that a real container detector first built with C++11–17 using type_traits, decltype/declval, SFINAE, enable_if and void_t becomes far simpler with C++20 concepts. Implements an is_container concept using standard concepts, trailing requires and requires expressions instead of massive metafunctions, yields clearer compiler diagnostics (Clang 12 / GCC 10+), and preserves performance (small compile-time overhead) while making usage like comparing first elements concise and reliable.
AI-written summary · about
chapters (39)
- 0:00Introduction
- 0:50About Alex
- 1:40Templates
- 2:55Rules for Templates
- 3:35Trade Library
- 4:20FMT Library
- 7:35Trade
- 8:20Overload Resolution
- 10:05If Constant Expression
- 10:45Auto
- 12:05Pointer Concept
- 12:35Container Detection
- 12:55Sfine
- 13:20Ellipsis
- 16:15EnableIf
- 17:00Print
- 18:10Const
- 18:30Voity
- 19:30Nonequal Containers
- 23:35Usage
- 24:25Problems
- 25:45Concept Library
- 27:25Integral
- 28:50Variables
- 30:05Concepts
- 31:40Atomic Concepts
- 33:15RequireExpression
- 34:50RequiredExpression Example
- 38:55RequiredExpression
- 39:50Usage Inside the Template
- 41:30Usage Inside the Parameters
- 42:15Generic Lambdas
- 42:55Conjunction
- 45:45East Container
- 48:40Usage Example
- 50:15Errors
- 52:40Compiler overhead
- 54:35Pop quiz
- 56:00Add function
related talks
01h 27mC++20 Templates - the Next Level: Concepts and More
01h 39m“Concepts: The Future of Generic Programming (the future is here)”
54mC++ Concepts for Developers
52mConcepts: The Future of Generic Programming
01h 11mConcepts in 60: Everything you need to know and nothing you don't
01h 00mConcepts in C++20: Revolution or Evolution
57mIntroduction to C++ Template Metaprogramming
01h 07mConcepts As She Is Spoke
