Constraints and concepts
Constraints and concepts
This page describes an experimental core language feature. For named type requirements used in the specification of the standard library, see library concepts.
Class templates, function templates, and non-template functions (typically members of class templates) may be associated with a constraint, which specifies the requirements on template arguments, which can be used to select the most appropriate function overloads and template specializations.
Constraints may also be used to limit automatic type deduction in variable declarations and function return types to only the types that satisfy specified requirements.
Named sets o