Modern techniques for keeping your code dry
summary
Shows how to build zero-cost abstractions in modern C++ using fold expressions, constructor template argument deduction and deduction guides, lambda factories, tuple+apply and small higher-order helpers to write readable predicates like any_of/each_of. Claims the generated assembly is identical across clang GCC and MSVC, so no runtime cost. Delivers working code that builds readable checks, a bind-right helper and tuple-as-lambda tricks, but notes unpleasant repetition for conditional noexcept and explicit return-type SFINAE that currently force macros or awkward boilerplate.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 0:36Repetition
- 2:05About me
- 3:43Function templates
- 6:08Nontype templates
- 8:25Construct an object
- 10:55Construct a type
- 14:24Private inheritance
- 19:12Good or bad
- 24:59Indirection
- 43:44Perfect forwarding
related talks
01h 03mHigher order functions for ordinary C++ developers
59mModern C++ for Fun and Profit: This isn’t your old C++
50mC++ Costless Abstractions: the compiler view
05mBeautiful Folds
01h 03mFunctional C++ for Fun & Profit
55mTemplates Made Easy With C++20
01h 07mDesign Patterns in Modern C++
01h 35mC++20 – My Favourite Code Examples
