[expr.prim.req.nested] (original) (raw)
7 Expressions [expr]
7.5 Primary expressions [expr.prim]
7.5.8 Requires expressions [expr.prim.req]
7.5.8.5 Nested requirements [expr.prim.req.nested]
nested-requirement:
requires constraint-expression ;
A nested-requirement can be used to specify additional constraints in terms of local parameters.
The constraint-expressionshall be satisfied ([temp.constr.decl]) by the substituted template arguments, if any.
Substitution of template arguments into a nested-requirementdoes not result in substitution into the constraint-expressionother than as specified in [temp.constr.constr].
[Example 1:
template<typename U> concept C = sizeof(U) == 1;template<typename T> concept D = requires (T t) { requires C<decltype (+t)>;}; D<T> is satisfied if sizeof(decltype (+t)) == 1 ([temp.constr.atomic]).
— _end example_]