class TemplateTemplateParmDecl
Declaration
class TemplateTemplateParmDecl : public TemplateDecl,
protected TemplateParmPosition,
private TrailingObjects { /* full declaration omitted */ };
Description
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in A template template parameter is a TemplateDecl because it defines the name of a template and the template parameters allowable for substitution.
Declared at: clang/include/clang/AST/DeclTemplate.h:1627
Inherits from: TemplateDecl, TemplateParmPosition, TrailingObjects
Member Variables
- private clang::TemplateTemplateParmDecl::DefArgStorage DefaultArgument
- private bool ParameterPack
- Whether this parameter is a parameter pack.
- private bool ExpandedParameterPack = false
- Whether this template template parameter is an "expanded" parameter pack, meaning that it is a pack expansion and we already know the set of template parameters that expansion expands to.
- private unsigned int NumExpandedParams = 0
- The number of parameters in an expanded parameter pack.
Inherited from TemplateParmPosition:
- protected Depth
- protected Position
- protected static MaxDepth = (1U << DepthWidth) - 1
- protected static MaxPosition = (1U << PositionWidth) - 1
Inherited from TemplateDecl:
Inherited from Decl:
- protected NextInContextAndBits
- protected Access
- protected FromASTFile
- protected IdentifierNamespace
- protected CacheValidAndLinkage
Method Overview
- public static clang::TemplateTemplateParmDecl * Create(const clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation L, unsigned int D, unsigned int P, bool ParameterPack, clang::IdentifierInfo * Id, clang::TemplateParameterList * Params)
- public static clang::TemplateTemplateParmDecl * Create(const clang::ASTContext & C, clang::DeclContext * DC, clang::SourceLocation L, unsigned int D, unsigned int P, clang::IdentifierInfo * Id, clang::TemplateParameterList * Params, ArrayRef<clang::TemplateParameterList *> Expansions)
- public static clang::TemplateTemplateParmDecl * CreateDeserialized(clang::ASTContext & C, unsigned int ID)
- public static clang::TemplateTemplateParmDecl * CreateDeserialized(clang::ASTContext & C, unsigned int ID, unsigned int NumExpansions)
- private TemplateTemplateParmDecl(clang::DeclContext * DC, clang::SourceLocation L, unsigned int D, unsigned int P, clang::IdentifierInfo * Id, clang::TemplateParameterList * Params, ArrayRef<clang::TemplateParameterList *> Expansions)
- private TemplateTemplateParmDecl(clang::DeclContext * DC, clang::SourceLocation L, unsigned int D, unsigned int P, bool ParameterPack, clang::IdentifierInfo * Id, clang::TemplateParameterList * Params)
- private void anchor()
- public static bool classof(const clang::Decl * D)
- public static bool classofKind(clang::Decl::Kind K)
- public bool defaultArgumentWasInherited() const
- public const clang::TemplateTemplateParmDecl::DefArgStorage & getDefaultArgStorage() const
- public const clang::TemplateArgumentLoc & getDefaultArgument() const
- public clang::SourceLocation getDefaultArgumentLoc() const
- public clang::TemplateParameterList * getExpansionTemplateParameters(unsigned int I) const
- public unsigned int getNumExpansionTemplateParameters() const
- public clang::SourceRange getSourceRange() const
- public bool hasDefaultArgument() const
- public bool isExpandedParameterPack() const
- public bool isPackExpansion() const
- public bool isParameterPack() const
- public void removeDefaultArgument()
- public void setDefaultArgument(const clang::ASTContext & C, const clang::TemplateArgumentLoc & DefArg)
- public void setInheritedDefaultArgument(const clang::ASTContext & C, clang::TemplateTemplateParmDecl * Prev)
Inherited from TemplateParmPosition:
Inherited from TemplateDecl:
- public classof
- public classofKind
- public getAssociatedConstraints
- public getSourceRange
- public getTemplateParameters
- public getTemplatedDecl
- public hasAssociatedConstraints
- public init
- protected setTemplateParameters
Inherited from NamedDecl:
- public classof
- public classofKind
- public declarationReplaces
- public getDeclName
- public getExplicitVisibility
- public getFormalLinkage
- public getIdentifier
- public getLinkageAndVisibility
- public getLinkageInternal
- public getMostRecentDecl
- public getMostRecentDecl
- public getName
- public getNameAsString
- public getNameForDiagnostic
- public getObjCFStringFormattingFamily
- public getQualifiedNameAsString
- public getUnderlyingDecl
- public getUnderlyingDecl
- public getVisibility
- public hasExternalFormalLinkage
- public hasLinkage
- public hasLinkageBeenComputed
- public isCXXClassMember
- public isCXXInstanceMember
- public isExternallyDeclarable
- public isExternallyVisible
- public isLinkageValid
- public isReserved
- public printName
- public printNestedNameSpecifier
- public printNestedNameSpecifier
- public printQualifiedName
- public printQualifiedName
- public setDeclName
Inherited from Decl:
- public EnableStatistics
- public PrintStats
- public add
- public addAttr
- public attr_begin
- public attr_end
- public attrs
- public canBeWeakImported
- public castFromDeclContext
- public castToDeclContext
- public classofKind
- public dropAttr
- public dropAttrs
- public dump
- public dump
- public dumpColor
- public getASTContext
- protected getASTMutationListener
- public getAccess
- public getAccessUnsafe
- public getAsFunction
- public getAsFunction
- public getAttr
- public getAttrs
- public getAttrs
- public getAvailability
- public getBeginLoc
- public getBody
- public getBodyRBrace
- protected getCachedLinkage
- public getCanonicalDecl
- public getCanonicalDecl
- public getDeclContext
- public getDeclContext
- public getDeclKindName
- public getDefiningAttr
- public getDescribedTemplate
- public getDescribedTemplateParams
- public getEndLoc
- public getExternalSourceSymbolAttr
- public getFriendObjectKind
- public getFunctionType
- public getGlobalID
- public getID
- public getIdentifierNamespace
- public getIdentifierNamespaceForKind
- public getImportedOwningModule
- public getKind
- public getLangOpts
- public getLexicalDeclContext
- public getLexicalDeclContext
- public getLocalOwningModule
- public getLocation
- public getMaxAlignment
- public getModuleOwnershipKind
- public getMostRecentDecl
- public getMostRecentDecl
- protected getMostRecentDeclImpl
- public getNextDeclInContext
- public getNextDeclInContext
- protected getNextRedeclarationImpl
- public getNonClosureContext
- public getNonClosureContext
- public getOwningModule
- public getOwningModuleForLinkage
- public getOwningModuleID
- public getParentFunctionOrMethod
- public getParentFunctionOrMethod
- public getPreviousDecl
- public getPreviousDecl
- protected getPreviousDeclImpl
- public getSourceRange
- public getTemplateDepth
- public getTranslationUnitDecl
- public getTranslationUnitDecl
- public getVersionIntroduced
- public hasAttr
- public hasAttrs
- public hasBody
- protected hasCachedLinkage
- public hasDefiningAttr
- protected hasLocalOwningModuleStorage
- public hasOwningModule
- public hasTagIdentifierNamespace
- public isCanonicalDecl
- public isDefinedOutsideFunctionOrMethod
- public isDeprecated
- public isDiscardedInGlobalModuleFragment
- public isFirstDecl
- public isFromASTFile
- public isFunctionOrFunctionTemplate
- public isImplicit
- public isInAnonymousNamespace
- public isInExportDeclContext
- public isInIdentifierNamespace
- public isInLocalScopeForInstantiation
- public isInStdNamespace
- public isInvalidDecl
- public isInvisibleOutsideTheOwningModule
- public isLocalExternDecl
- public isModulePrivate
- public isOutOfLine
- public isParameterPack
- public isReachable
- public isReferenced
- public isTagIdentifierNamespace
- public isTemplateDecl
- public isTemplateParameter
- public isTemplateParameterPack
- public isTemplated
- public isThisDeclarationReferenced
- public isTopLevelDeclInObjCContainer
- public isUnavailable
- public isUnconditionallyVisible
- public isUsed
- public isWeakImported
- public markUsed
- public print
- public print
- public printGroup
- public redecls
- public redecls_begin
- public redecls_end
- public setAccess
- public setAttrs
- protected setCachedLinkage
- public setDeclContext
- public setFromASTFile
- public setImplicit
- public setInvalidDecl
- public setIsUsed
- public setLexicalDeclContext
- public setLocalExternDecl
- public setLocalOwningModule
- public setLocation
- public setModuleOwnershipKind
- protected setModulePrivate
- public setNonMemberOperator
- public setObjectOfFriendDecl
- public setOwningModuleID
- public setReferenced
- public setTopLevelDeclInObjCContainer
- public setVisibleDespiteOwningModule
- public specific_attr_begin
- public specific_attr_end
- public specific_attrs
- protected updateOutOfDate
Methods
¶static clang::TemplateTemplateParmDecl* Create(
const clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation L,
unsigned int D,
unsigned int P,
bool ParameterPack,
clang::IdentifierInfo* Id,
clang::TemplateParameterList* Params)
static clang::TemplateTemplateParmDecl* Create(
const clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation L,
unsigned int D,
unsigned int P,
bool ParameterPack,
clang::IdentifierInfo* Id,
clang::TemplateParameterList* Params)
Declared at: clang/include/clang/AST/DeclTemplate.h:1666
Parameters
- const clang::ASTContext& C
- clang::DeclContext* DC
- clang::SourceLocation L
- unsigned int D
- unsigned int P
- bool ParameterPack
- clang::IdentifierInfo* Id
- clang::TemplateParameterList* Params
¶static clang::TemplateTemplateParmDecl* Create(
const clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation L,
unsigned int D,
unsigned int P,
clang::IdentifierInfo* Id,
clang::TemplateParameterList* Params,
ArrayRef<clang::TemplateParameterList*>
Expansions)
static clang::TemplateTemplateParmDecl* Create(
const clang::ASTContext& C,
clang::DeclContext* DC,
clang::SourceLocation L,
unsigned int D,
unsigned int P,
clang::IdentifierInfo* Id,
clang::TemplateParameterList* Params,
ArrayRef<clang::TemplateParameterList*>
Expansions)
Declared at: clang/include/clang/AST/DeclTemplate.h:1671
Parameters
- const clang::ASTContext& C
- clang::DeclContext* DC
- clang::SourceLocation L
- unsigned int D
- unsigned int P
- clang::IdentifierInfo* Id
- clang::TemplateParameterList* Params
- ArrayRef<clang::TemplateParameterList*> Expansions
¶static clang::TemplateTemplateParmDecl*
CreateDeserialized(clang::ASTContext& C,
unsigned int ID)
static clang::TemplateTemplateParmDecl*
CreateDeserialized(clang::ASTContext& C,
unsigned int ID)
Declared at: clang/include/clang/AST/DeclTemplate.h:1678
Parameters
- clang::ASTContext& C
- unsigned int ID
¶static clang::TemplateTemplateParmDecl*
CreateDeserialized(clang::ASTContext& C,
unsigned int ID,
unsigned int NumExpansions)
static clang::TemplateTemplateParmDecl*
CreateDeserialized(clang::ASTContext& C,
unsigned int ID,
unsigned int NumExpansions)
Declared at: clang/include/clang/AST/DeclTemplate.h:1680
Parameters
- clang::ASTContext& C
- unsigned int ID
- unsigned int NumExpansions
¶TemplateTemplateParmDecl(
clang::DeclContext* DC,
clang::SourceLocation L,
unsigned int D,
unsigned int P,
clang::IdentifierInfo* Id,
clang::TemplateParameterList* Params,
ArrayRef<clang::TemplateParameterList*>
Expansions)
TemplateTemplateParmDecl(
clang::DeclContext* DC,
clang::SourceLocation L,
unsigned int D,
unsigned int P,
clang::IdentifierInfo* Id,
clang::TemplateParameterList* Params,
ArrayRef<clang::TemplateParameterList*>
Expansions)
Declared at: clang/include/clang/AST/DeclTemplate.h:1654
Parameters
- clang::DeclContext* DC
- clang::SourceLocation L
- unsigned int D
- unsigned int P
- clang::IdentifierInfo* Id
- clang::TemplateParameterList* Params
- ArrayRef<clang::TemplateParameterList*> Expansions
¶TemplateTemplateParmDecl(
clang::DeclContext* DC,
clang::SourceLocation L,
unsigned int D,
unsigned int P,
bool ParameterPack,
clang::IdentifierInfo* Id,
clang::TemplateParameterList* Params)
TemplateTemplateParmDecl(
clang::DeclContext* DC,
clang::SourceLocation L,
unsigned int D,
unsigned int P,
bool ParameterPack,
clang::IdentifierInfo* Id,
clang::TemplateParameterList* Params)
Declared at: clang/include/clang/AST/DeclTemplate.h:1648
Parameters
- clang::DeclContext* DC
- clang::SourceLocation L
- unsigned int D
- unsigned int P
- bool ParameterPack
- clang::IdentifierInfo* Id
- clang::TemplateParameterList* Params
¶void anchor()
void anchor()
Declared at: clang/include/clang/AST/DeclTemplate.h:1659
¶static bool classof(const clang::Decl* D)
static bool classof(const clang::Decl* D)
Declared at: clang/include/clang/AST/DeclTemplate.h:1783
Parameters
- const clang::Decl* D
¶static bool classofKind(clang::Decl::Kind K)
static bool classofKind(clang::Decl::Kind K)
Declared at: clang/include/clang/AST/DeclTemplate.h:1784
Parameters
- clang::Decl::Kind K
¶bool defaultArgumentWasInherited() const
bool defaultArgumentWasInherited() const
Description
Determines whether the default argument was inherited from a previous declaration of this template.
Declared at: clang/include/clang/AST/DeclTemplate.h:1758
¶const clang::TemplateTemplateParmDecl::
DefArgStorage&
getDefaultArgStorage() const
const clang::TemplateTemplateParmDecl::
DefArgStorage&
getDefaultArgStorage() const
Declared at: clang/include/clang/AST/DeclTemplate.h:1741
¶const clang::TemplateArgumentLoc&
getDefaultArgument() const
const clang::TemplateArgumentLoc&
getDefaultArgument() const
Description
Retrieve the default argument, if any.
Declared at: clang/include/clang/AST/DeclTemplate.h:1748
¶clang::SourceLocation getDefaultArgumentLoc()
const
clang::SourceLocation getDefaultArgumentLoc()
const
Description
Retrieve the location of the default argument, if any.
Declared at: clang/include/clang/AST/DeclTemplate.h:1754
¶clang::TemplateParameterList*
getExpansionTemplateParameters(
unsigned int I) const
clang::TemplateParameterList*
getExpansionTemplateParameters(
unsigned int I) const
Description
Retrieve a particular expansion type within an expanded parameter pack.
Declared at: clang/include/clang/AST/DeclTemplate.h:1736
Parameters
- unsigned int I
¶unsigned int getNumExpansionTemplateParameters()
const
unsigned int getNumExpansionTemplateParameters()
const
Description
Retrieves the number of expansion template parameters in an expanded parameter pack.
Declared at: clang/include/clang/AST/DeclTemplate.h:1729
¶clang::SourceRange getSourceRange() const
clang::SourceRange getSourceRange() const
Description
Source range that this declaration covers.
Declared at: clang/include/clang/AST/DeclTemplate.h:1775
¶bool hasDefaultArgument() const
bool hasDefaultArgument() const
Description
Determine whether this template parameter has a default argument.
Declared at: clang/include/clang/AST/DeclTemplate.h:1745
¶bool isExpandedParameterPack() const
bool isExpandedParameterPack() const
Description
Whether this parameter is a template template parameter pack that has a known list of different template parameter lists at different positions. A parameter pack is an expanded parameter pack when the original parameter pack's template parameter list was itself a pack expansion, and that expansion has already been expanded. For exampe, given: The parameter pack \c Templates is a pack expansion, which expands the pack \c Types. When \c Types is supplied with template arguments by instantiating \c Outer, the instantiation of \c Templates is an expanded parameter pack.
Declared at: clang/include/clang/AST/DeclTemplate.h:1725
¶bool isPackExpansion() const
bool isPackExpansion() const
Description
Whether this parameter pack is a pack expansion. A template template parameter pack is a pack expansion if its template parameter list contains an unexpanded parameter pack.
Declared at: clang/include/clang/AST/DeclTemplate.h:1702
¶bool isParameterPack() const
bool isParameterPack() const
Description
Whether this template template parameter is a template parameter pack.
Declared at: clang/include/clang/AST/DeclTemplate.h:1696
¶void removeDefaultArgument()
void removeDefaultArgument()
Description
Removes the default argument of this template parameter.
Declared at: clang/include/clang/AST/DeclTemplate.h:1773
¶void setDefaultArgument(
const clang::ASTContext& C,
const clang::TemplateArgumentLoc& DefArg)
void setDefaultArgument(
const clang::ASTContext& C,
const clang::TemplateArgumentLoc& DefArg)
Description
Set the default argument for this template parameter, and whether that default argument was inherited from another declaration.
Declared at: clang/include/clang/AST/DeclTemplate.h:1765
Parameters
- const clang::ASTContext& C
- const clang::TemplateArgumentLoc& DefArg
¶void setInheritedDefaultArgument(
const clang::ASTContext& C,
clang::TemplateTemplateParmDecl* Prev)
void setInheritedDefaultArgument(
const clang::ASTContext& C,
clang::TemplateTemplateParmDecl* Prev)
Declared at: clang/include/clang/AST/DeclTemplate.h:1767
Parameters
- const clang::ASTContext& C
- clang::TemplateTemplateParmDecl* Prev