C++20 Templates - the Next Level: Concepts and More
summary
Walks through C++20 features with concrete code: converts a variadic add implementation from SFINAE to Concepts using a reusable edible concept and tested it with static_assert plus small template stubs, shows requires expressions that check operator+, noexcept and return type, demonstrates abbreviated function templates (no template head), conditional destructor via trailing requires, conditional explicit, NTTPs for floats and class types with a fixed_string NTTP example, and templated lambdas; compiler diagnostics improve and examples compile as shown.
AI-written summary · about
chapters (7)
- 0:00Start
- 16:12Application areas for Concepts
- 31:08Compound requirement
- 41:40Testing the created concept
- 44:41Abbreviated function templates
- 49:42Dependent destructor
- 55:04Conditional explicit
related talks
01h 35mC++20 – My Favourite Code Examples
01h 00mConcepts in C++20: Revolution or Evolution
01h 21mWhat Has C++20 Ever Done For Templates?
01h 03mBack to Basics: Templates (part 2 of 2)
59mMetaprogramming: From Templates to Concepts
01h 02mC++20 - My Favourite Code Examples
54mC++ Concepts for Developers
01h 39m“Concepts: The Future of Generic Programming (the future is here)”
