13 Templates [temp]

13.5 Template constraints [temp.constr]

13.5.2 Constraints [temp.constr.constr]

13.5.2.4 Concept-dependent constraints [temp.constr.concept]

A concept-dependent constraint CD is an atomic constraint whose expression is a concept-id CI whose concept-name names a dependent concept named C.
To determine if CD is satisfied, the parameter mapping and template arguments are first substituted into C.
If substitution results in an invalid concept-id in the immediate context of the constraint ([temp.deduct.general]), the constraint is not satisfied.
Otherwise, let CI be the normal form ([temp.constr.normal]) of the concept-id after substitution of C.
[Note 1: 
Normalization of CI might be ill-formed; no diagnostics is required.
— end note]
To form CI, each appearance of C's template parameters in the parameter mappings of the atomic constraints (including concept-dependent constraints) in CI is substituted with their respective arguments from the parameter mapping of CD and the arguments of CI.
CD is satisfied if CI is satisfied.
[Note 2: 
Checking whether CI is satisfied can lead to further normalization of concept-dependent constraints.
— end note]
[Example 1: template<typename> concept C = true; template<typename T, template<typename> concept CC> concept D = CC<T>; template<typename U, template<typename> concept CT, template<typename, template<typename> concept> concept CU> int f() requires CU<U, CT>; int i = f<int, C, D>();
In this example, the associated constraints of f consist of a concept-dependent constraint whose expression is the concept-id CU<U, CT> with the mapping .
The result of substituting D into this expression is D<U, CT>.
We consider the normal form of the resulting concept-id, which is CC<T> with the mapping .
By recursion, C is substituted into CC<T>, and the result is normalized to the atomic constraint true, which is satisfied.
— end example]