clang: clang::TypeConstraint Class Reference (original) (raw)
Models the abbreviated syntax to constrain a template type parameter: template <convertible_to T> void print(T object); ~~~~~~~~~~~~~~~~~~~~~~ Semantically, this adds an "immediately-declared constraint" with extra arg: requires convertible_to<T, string> More...
Get the immediately-declared constraint expression introduced by this type-constraint, that is - the constraint expression that is added to the associated constraints of the enclosing declaration in practice.
Models the abbreviated syntax to constrain a template type parameter: template <convertible_to T> void print(T object); ~~~~~~~~~~~~~~~~~~~~~~ Semantically, this adds an "immediately-declared constraint" with extra arg: requires convertible_to<T, string>
In the C++ grammar, a type-constraint is also used for auto types: convertible_to auto X = ...; We do not model these as TypeConstraints, but AutoType(Loc) directly.