class TemplateParameterList
Declaration
class TemplateParameterList : private TrailingObjects { /* full declaration omitted */ };
Description
Stores a list of template parameters for a TemplateDecl and its derived classes.
Declared at: clang/include/clang/AST/DeclTemplate.h:70
Inherits from: TrailingObjects
Member Variables
- private clang::SourceLocation TemplateLoc
- The location of the 'template' keyword.
- private clang::SourceLocation LAngleLoc
- The locations of the ' < ' and '>' angle brackets.
- private clang::SourceLocation RAngleLoc
- The locations of the ' < ' and '>' angle brackets.
- private unsigned int NumParams
- The number of template parameters in this template parameter list.
- private unsigned int ContainsUnexpandedParameterPack
- Whether this template parameter list contains an unexpanded parameter pack.
- private unsigned int HasRequiresClause
- Whether this template parameter list has a requires clause.
- private unsigned int HasConstrainedParameters
- Whether any of the template parameters has constrained-parameter constraint-expression.
Method Overview
- public static clang::TemplateParameterList * Create(const clang::ASTContext & C, clang::SourceLocation TemplateLoc, clang::SourceLocation LAngleLoc, ArrayRef<clang::NamedDecl *> Params, clang::SourceLocation RAngleLoc, clang::Expr * RequiresClause)
- protected TemplateParameterList(const clang::ASTContext & C, clang::SourceLocation TemplateLoc, clang::SourceLocation LAngleLoc, ArrayRef<clang::NamedDecl *> Params, clang::SourceLocation RAngleLoc, clang::Expr * RequiresClause)
- public ArrayRef<clang::NamedDecl *> asArray()
- public ArrayRef<const clang::NamedDecl *> asArray() const
- public clang::TemplateParameterList::iterator begin()
- public clang::TemplateParameterList::const_iterator begin() const
- public bool containsUnexpandedParameterPack() const
- public clang::TemplateParameterList::iterator end()
- public clang::TemplateParameterList::const_iterator end() const
- public void getAssociatedConstraints(llvm::SmallVectorImpl<const Expr *> & AC) const
- public unsigned int getDepth() const
- public clang::SourceLocation getLAngleLoc() const
- public unsigned int getMinRequiredArguments() const
- public const clang::NamedDecl * getParam(unsigned int Idx) const
- public clang::NamedDecl * getParam(unsigned int Idx)
- public clang::SourceLocation getRAngleLoc() const
- public clang::Expr * getRequiresClause()
- public const clang::Expr * getRequiresClause() const
- public clang::SourceRange getSourceRange() const
- public clang::SourceLocation getTemplateLoc() const
- public bool hasAssociatedConstraints() const
- public bool hasParameterPack() const
- protected size_t numTrailingObjects(OverloadToken<clang::NamedDecl *>) const
- protected size_t numTrailingObjects(OverloadToken<clang::Expr *>) const
- public void print(llvm::raw_ostream & Out, const clang::ASTContext & Context, bool OmitTemplateKW = false) const
- public void print(llvm::raw_ostream & Out, const clang::ASTContext & Context, const clang::PrintingPolicy & Policy, bool OmitTemplateKW = false) const
- public static bool shouldIncludeTypeForArgument(const clang::PrintingPolicy & Policy, const clang::TemplateParameterList * TPL, unsigned int Idx)
- public unsigned int size() const
Methods
¶static clang::TemplateParameterList* Create(
const clang::ASTContext& C,
clang::SourceLocation TemplateLoc,
clang::SourceLocation LAngleLoc,
ArrayRef<clang::NamedDecl*> Params,
clang::SourceLocation RAngleLoc,
clang::Expr* RequiresClause)
static clang::TemplateParameterList* Create(
const clang::ASTContext& C,
clang::SourceLocation TemplateLoc,
clang::SourceLocation LAngleLoc,
ArrayRef<clang::NamedDecl*> Params,
clang::SourceLocation RAngleLoc,
clang::Expr* RequiresClause)
Declared at: clang/include/clang/AST/DeclTemplate.h:112
Parameters
- const clang::ASTContext& C
- clang::SourceLocation TemplateLoc
- clang::SourceLocation LAngleLoc
- ArrayRef<clang::NamedDecl*> Params
- clang::SourceLocation RAngleLoc
- clang::Expr* RequiresClause
¶TemplateParameterList(
const clang::ASTContext& C,
clang::SourceLocation TemplateLoc,
clang::SourceLocation LAngleLoc,
ArrayRef<clang::NamedDecl*> Params,
clang::SourceLocation RAngleLoc,
clang::Expr* RequiresClause)
TemplateParameterList(
const clang::ASTContext& C,
clang::SourceLocation TemplateLoc,
clang::SourceLocation LAngleLoc,
ArrayRef<clang::NamedDecl*> Params,
clang::SourceLocation RAngleLoc,
clang::Expr* RequiresClause)
Declared at: clang/include/clang/AST/DeclTemplate.h:95
Parameters
- const clang::ASTContext& C
- clang::SourceLocation TemplateLoc
- clang::SourceLocation LAngleLoc
- ArrayRef<clang::NamedDecl*> Params
- clang::SourceLocation RAngleLoc
- clang::Expr* RequiresClause
¶ArrayRef<clang::NamedDecl*> asArray()
ArrayRef<clang::NamedDecl*> asArray()
Declared at: clang/include/clang/AST/DeclTemplate.h:132
¶ArrayRef<const clang::NamedDecl*> asArray() const
ArrayRef<const clang::NamedDecl*> asArray() const
Declared at: clang/include/clang/AST/DeclTemplate.h:135
¶clang::TemplateParameterList::iterator begin()
clang::TemplateParameterList::iterator begin()
Declared at: clang/include/clang/AST/DeclTemplate.h:125
¶clang::TemplateParameterList::const_iterator
begin() const
clang::TemplateParameterList::const_iterator
begin() const
Declared at: clang/include/clang/AST/DeclTemplate.h:126
¶bool containsUnexpandedParameterPack() const
bool containsUnexpandedParameterPack() const
Description
Determine whether this template parameter list contains an unexpanded parameter pack.
Declared at: clang/include/clang/AST/DeclTemplate.h:164
¶clang::TemplateParameterList::iterator end()
clang::TemplateParameterList::iterator end()
Declared at: clang/include/clang/AST/DeclTemplate.h:127
¶clang::TemplateParameterList::const_iterator end()
const
clang::TemplateParameterList::const_iterator end()
const
Declared at: clang/include/clang/AST/DeclTemplate.h:128
¶void getAssociatedConstraints(
llvm::SmallVectorImpl<const Expr*>& AC) const
void getAssociatedConstraints(
llvm::SmallVectorImpl<const Expr*>& AC) const
Description
All associated constraints derived from this template parameter list, including the requires clause and any constraints derived from constrained-parameters.
The constraints in the resulting list are to be treated as if in a conjunction ("and").
Declared at: clang/include/clang/AST/DeclTemplate.h:190
Parameters
- llvm::SmallVectorImpl<const Expr*>& AC
¶unsigned int getDepth() const
unsigned int getDepth() const
Description
Get the depth of this template parameter list in the set of template parameter lists. The first template parameter list in a declaration will have depth 0, the second template parameter list will have depth 1, etc.
Declared at: clang/include/clang/AST/DeclTemplate.h:160
¶clang::SourceLocation getLAngleLoc() const
clang::SourceLocation getLAngleLoc() const
Declared at: clang/include/clang/AST/DeclTemplate.h:195
¶unsigned int getMinRequiredArguments() const
unsigned int getMinRequiredArguments() const
Description
Returns the minimum number of arguments needed to form a template specialization. This may be fewer than the number of template parameters, if some of the parameters have default arguments or if there is a parameter pack.
Declared at: clang/include/clang/AST/DeclTemplate.h:153
¶const clang::NamedDecl* getParam(
unsigned int Idx) const
const clang::NamedDecl* getParam(
unsigned int Idx) const
Declared at: clang/include/clang/AST/DeclTemplate.h:143
Parameters
- unsigned int Idx
¶clang::NamedDecl* getParam(unsigned int Idx)
clang::NamedDecl* getParam(unsigned int Idx)
Declared at: clang/include/clang/AST/DeclTemplate.h:139
Parameters
- unsigned int Idx
¶clang::SourceLocation getRAngleLoc() const
clang::SourceLocation getRAngleLoc() const
Declared at: clang/include/clang/AST/DeclTemplate.h:196
¶clang::Expr* getRequiresClause()
clang::Expr* getRequiresClause()
Description
The constraint-expression of the associated requires-clause.
Declared at: clang/include/clang/AST/DeclTemplate.h:175
¶const clang::Expr* getRequiresClause() const
const clang::Expr* getRequiresClause() const
Description
The constraint-expression of the associated requires-clause.
Declared at: clang/include/clang/AST/DeclTemplate.h:180
¶clang::SourceRange getSourceRange() const
clang::SourceRange getSourceRange() const
Declared at: clang/include/clang/AST/DeclTemplate.h:198
¶clang::SourceLocation getTemplateLoc() const
clang::SourceLocation getTemplateLoc() const
Declared at: clang/include/clang/AST/DeclTemplate.h:194
¶bool hasAssociatedConstraints() const
bool hasAssociatedConstraints() const
Declared at: clang/include/clang/AST/DeclTemplate.h:192
¶bool hasParameterPack() const
bool hasParameterPack() const
Description
Determine whether this template parameter list contains a parameter pack.
Declared at: clang/include/clang/AST/DeclTemplate.h:167
¶size_t numTrailingObjects(
OverloadToken<clang::NamedDecl*>) const
size_t numTrailingObjects(
OverloadToken<clang::NamedDecl*>) const
Declared at: clang/include/clang/AST/DeclTemplate.h:99
Parameters
- OverloadToken<clang::NamedDecl*>
¶size_t numTrailingObjects(
OverloadToken<clang::Expr*>) const
size_t numTrailingObjects(
OverloadToken<clang::Expr*>) const
Declared at: clang/include/clang/AST/DeclTemplate.h:103
Parameters
- OverloadToken<clang::Expr*>
¶void print(llvm::raw_ostream& Out,
const clang::ASTContext& Context,
bool OmitTemplateKW = false) const
void print(llvm::raw_ostream& Out,
const clang::ASTContext& Context,
bool OmitTemplateKW = false) const
Declared at: clang/include/clang/AST/DeclTemplate.h:202
Parameters
- llvm::raw_ostream& Out
- const clang::ASTContext& Context
- bool OmitTemplateKW = false
¶void print(llvm::raw_ostream& Out,
const clang::ASTContext& Context,
const clang::PrintingPolicy& Policy,
bool OmitTemplateKW = false) const
void print(llvm::raw_ostream& Out,
const clang::ASTContext& Context,
const clang::PrintingPolicy& Policy,
bool OmitTemplateKW = false) const
Declared at: clang/include/clang/AST/DeclTemplate.h:204
Parameters
- llvm::raw_ostream& Out
- const clang::ASTContext& Context
- const clang::PrintingPolicy& Policy
- bool OmitTemplateKW = false
¶static bool shouldIncludeTypeForArgument(
const clang::PrintingPolicy& Policy,
const clang::TemplateParameterList* TPL,
unsigned int Idx)
static bool shouldIncludeTypeForArgument(
const clang::PrintingPolicy& Policy,
const clang::TemplateParameterList* TPL,
unsigned int Idx)
Declared at: clang/include/clang/AST/DeclTemplate.h:207
Parameters
- const clang::PrintingPolicy& Policy
- const clang::TemplateParameterList* TPL
- unsigned int Idx
¶unsigned int size() const
unsigned int size() const
Declared at: clang/include/clang/AST/DeclTemplate.h:130