From Jason Turner
Watch on YouTube

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.

Resources

Tags