Summary
This episode explores C++20's new template syntax for lambdas, which extends C++14's generic lambdas with explicit template parameters. Jason demonstrates how this new syntax allows for stronger type constraints, particularly showing two key use cases: enforcing same-type parameters and pattern matching with template parameters. While auto parameters use template type deduction rules already, the explicit template syntax enables more precise control over type relationships between parameters and better expression of intent.
Related C++ Standard Sections
This episode covers topics found in these sections of the C++ standard:
-
[temp.arg.type]74% match -
[temp]73% match -
[dcl.type.class.deduct]68% match -
[temp.arg.explicit]64% match -
[temp.arg.template]64% match -
[namespace.constraints]63% match -
[constraints]63% match -
[temp.explicit]63% match -
[temp.constr.decl]63% match -
[temp.dep.type]58% match - + 14 more related sections