7 Expressions [expr]

7.5 Primary expressions [expr.prim]

7.5.7 Requires expressions [expr.prim.req]

7.5.7.3 Compound requirements [expr.prim.req.compound]

compound-requirement:
	{ expression } noexcept return-type-requirement ;
return-type-requirement:
	-> type-constraint
A compound-requirement asserts properties of the expression E.
Substitution of template arguments (if any) and verification of semantic properties proceed in the following order:
Example
:
template<typename T> concept C1 = requires(T x) {
  {x++};
};
The compound-requirement in C1 requires that x++ is a valid expression.
It is equivalent to the simple-requirement x++;.
template<typename T> concept C2 = requires(T x) {
  {*x} -> same_as<typename T::inner>;
};
The compound-requirement in C2 requires that *x is a valid expression, that typename T​::​inner is a valid type, and that same_­as<decltype((*x)), typename T​::​inner> is satisfied.
template<typename T> concept C3 =
  requires(T x) {
    {g(x)} noexcept;
  };
The compound-requirement in C3 requires that g(x) is a valid expression and that g(x) is non-throwing.
— end example
 ]