13 Templates [temp]

13.7 Template declarations [temp.decls]

13.7.8 Concept definitions [temp.concept]

A concept is a template that defines constraints on its template arguments.
concept-definition:
	concept concept-name = constraint-expression ;
concept-name:
	identifier
A concept-definition declares a concept.
Its identifier becomes a concept-name referring to that concept within its scope.
Example
:
template<typename T>
concept C = requires(T x) {
  { x == x } -> 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 appear at namespace scope ([basic.scope.namespace]).
A concept shall not have associated constraints.
A concept is not instantiated ([temp.spec]).
Note
:
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.
— 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.