More...">

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...

#include "[clang/AST/ASTConcept.h](ASTConcept%5F8h%5Fsource.html)"

Public Member Functions
TypeConstraint (ConceptReference *ConceptRef, Expr *ImmediatelyDeclaredConstraint)
Expr * getImmediatelyDeclaredConstraint () const
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.
ConceptReference * getConceptReference () const
ConceptDecl * getNamedConcept () const
SourceLocation getConceptNameLoc () const
bool hasExplicitTemplateArgs () const
const ASTTemplateArgumentListInfo * getTemplateArgsAsWritten () const
SourceLocation getTemplateKWLoc () const
NamedDecl * getFoundDecl () const
const NestedNameSpecifierLoc & getNestedNameSpecifierLoc () const
const DeclarationNameInfo & getConceptNameInfo () const
void print (llvm::raw_ostream &OS, const PrintingPolicy &Policy) const

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.

Definition at line 227 of file ASTConcept.h.

clang::TypeConstraint::TypeConstraint ( ConceptReference * ConceptRef, Expr * ImmediatelyDeclaredConstraint ) inline

getConceptNameInfo()

getConceptNameLoc()

SourceLocation clang::TypeConstraint::getConceptNameLoc ( ) const inline

getConceptReference()

getFoundDecl()

NamedDecl * clang::TypeConstraint::getFoundDecl ( ) const inline

getImmediatelyDeclaredConstraint()

Expr * clang::TypeConstraint::getImmediatelyDeclaredConstraint ( ) const inline

getNamedConcept()

ConceptDecl * clang::TypeConstraint::getNamedConcept ( ) const inline

getNestedNameSpecifierLoc()

getTemplateArgsAsWritten()

getTemplateKWLoc()

SourceLocation clang::TypeConstraint::getTemplateKWLoc ( ) const inline

hasExplicitTemplateArgs()

bool clang::TypeConstraint::hasExplicitTemplateArgs ( ) const inline

print()

void clang::TypeConstraint::print ( llvm::raw_ostream & OS, const PrintingPolicy & Policy ) const inline

The documentation for this class was generated from the following file: