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 T, template<typename> concept CT, template<typename, template<typename> concept> concept CU> int f() requires CU<T, CT>; int _ = f<int, C, D>();
In this example, the associated constraint of f is a concept-dependent constraint CI whose expression is the concept-id CU<T, CT> with the mapping .

is the result of substituting D into CI.

We consider the normal form of D<T, CT>, which is CC<T> with the mapping .

By recursion, C is substituted in CC<T> and then normalized to the atomic constraint true, which is satisfied.
— end example]