#
A concept is a template that defines constraints on its template arguments.
concept-definition:
concept concept-name attribute-specifier-seq
concept-name:
identifier
2
#
A concept-definition declares a concept.
Its identifier becomes a concept-name referring to that concept within its scope.
The optional attribute-specifier-seq appertains to the concept.
[Example 1: template<typename T> concept C = requires(T x) { { x == x } -> std::convertible_to<bool>; }; template<typename T> requires C<T> / C constrains f1(T) in constraint-expression T f1(T x) { return x; } template<C T> / C, as a type-constraint, constrains f2(T) T f2(T x) { return x; } — end example]
A concept-definition shall inhabit a namespace scope ([basic.scope.namespace]).
A concept is not instantiated ([temp.spec]).
[Note 1: 
A concept-id ([temp.names]) is evaluated as an expression.
A concept cannot be explicitly instantiated ([temp.explicit]), explicitly specialized ([temp.expl.spec]), or partially specialized ([temp.spec.partial]).
— end note]
The constraint-expression of a concept-definition is an unevaluated operand ([expr.context]).
The first declared template parameter of a concept definition is its prototype parameter.
A type concept is a concept whose prototype parameter is a type template parameter.

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant