Using Concepts to Constrain Auto Parameters
Learn to simplify function template syntax and employ concepts to constrain the template arguments.
We'll cover the following...
We'll cover the following...
In the “Template Fundamentals” section, we discussed generic lambdas, introduced in C++14, as well as lambda templates, introduced in C++20. A lambda that uses the auto specifier for at least one parameter is called a generic lambda. The function object generated by the compiler will have a templated call operator. Here’s an example to refresh our memory: