C++20 Templates: The next level: Concepts and more - Andreas Fertig - CppCon 2021

Explore the powerful features of C++20 templates, including concepts, lambda functions, and more, in this informative talk.

Key takeaways
  • Lambdas can be used to define combinations of parameters, but concepts in C++20 provide a more readable and maintainable way to achieve this.
  • Concepts are used to define the requirements for a type, which can be used to constrain the types used in a function or class.
  • The requires clause can be used to define the requirements for a type, and can be used to specify that a type must have a particular member function or property.
  • Concepts can be used to define reusable code that can be used in multiple places, and can be used to define a interface that can be implemented by multiple types.
  • The static_assert keyword can be used to ensure that a concept is only used in a particular context.
  • Concepts can be used to define constraints on the types used in a function or class, and can be used to ensure that the types used in a function or class meet certain requirements.
  • The constexpr keyword can be used to specify that a concept is a constant-expression, which can be used to evaluate the concept at compile-time.
  • Concepts can be used to define a type that is a combination of multiple types, and can be used to define a type that has multiple implementations.
  • The decltype keyword can be used to specify the type of a concept, and can be used to specify the type of a variable or expression.
  • Concepts can be used to define a type that is a reference to a concept, and can be used to define a type that is a pointer to a concept.
  • The declval keyword can be used to specify a value that is used to evaluate a concept, and can be used to specify a value that is used to initialize a variable or expression.
  • Concepts can be used to define a type that is a combination of multiple concepts, and can be used to define a type that has multiple implementations.
  • The fold keyword can be used to specify a way of combining multiple values into a single value, and can be used to specify a way of combining multiple concepts into a single concept.
  • Concepts can be used to define a type that is a constant-expression, and can be used to define a type that has multiple implementations.
  • The constexpr keyword can be used to specify that a concept is a constant-expression, and can be used to specify that a concept is a compile-time evaluated expression.
  • Concepts can be used to define a type that is a reference to a concept, and can be used to define a type that is a pointer to a concept.
  • The decltype keyword can be used to specify the type of a concept, and can be used to specify the type of a variable or expression.
  • Concepts can be used to define a type that is a combination of multiple concepts, and can be used to define a type that has multiple implementations.
  • The requires clause can be used to define the requirements for a type, and can be used to specify that a type must have a particular member function or property.
  • Concepts can be used to define a type that is a constant-expression, and can be used to define a type that has multiple implementations.
  • The constexpr keyword can be used to specify that a concept is a constant-expression, and can be used to specify that a concept is a compile-time evaluated expression.
  • Concepts can be used to define a type that is a reference to a concept, and can be used to define a type that is a pointer to a concept.
  • The decltype keyword can be used to specify the type of a concept, and can be used to specify the type of a variable or expression.