class TemplateName
Declaration
class TemplateName { /* full declaration omitted */ };
Description
Represents a C++ template name within the type system. A C++ template name refers to a template within the C++ type system. In most cases, a template name is simply a reference to a class template, e.g. Here, the 'X' in \c X<int> is a template name that refers to the declaration of the class template X, above. Template names can also refer to function templates, C++0x template aliases, etc. Some template names are dependent. For example, consider: Here, "apply" is treated as a template name within the typename specifier in the typedef. "apply" is a nested template, and can only be understood in the context of
Declared at: clang/include/clang/AST/TemplateName.h:192
Member Variables
- private clang::TemplateName::StorageType Storage
Method Overview
- public void Profile(llvm::FoldingSetNodeID & ID)
- public TemplateName()
- private TemplateName(void * Ptr)
- public TemplateName(clang::UsingShadowDecl * Using)
- public TemplateName(clang::DependentTemplateName * Dep)
- public TemplateName(clang::QualifiedTemplateName * Qual)
- public TemplateName(clang::SubstTemplateTemplateParmPackStorage * Storage)
- public TemplateName(clang::SubstTemplateTemplateParmStorage * Storage)
- public TemplateName(clang::AssumedTemplateStorage * Storage)
- public TemplateName(clang::OverloadedTemplateStorage * Storage)
- public TemplateName(clang::TemplateDecl * Template)
- public bool containsUnexpandedParameterPack() const
- public void dump() const
- public void dump(llvm::raw_ostream & OS) const
- public clang::AssumedTemplateStorage * getAsAssumedTemplateName() const
- public clang::DependentTemplateName * getAsDependentTemplateName() const
- public clang::OverloadedTemplateStorage * getAsOverloadedTemplate() const
- public clang::QualifiedTemplateName * getAsQualifiedTemplateName() const
- public clang::SubstTemplateTemplateParmStorage * getAsSubstTemplateTemplateParm() const
- public clang::SubstTemplateTemplateParmPackStorage * getAsSubstTemplateTemplateParmPack() const
- public clang::TemplateDecl * getAsTemplateDecl() const
- public clang::UsingShadowDecl * getAsUsingShadowDecl() const
- public void * getAsVoidPointer() const
- public clang::TemplateNameDependence getDependence() const
- public static clang::TemplateName getFromVoidPointer(void * Ptr)
- public clang::TemplateName::NameKind getKind() const
- public clang::TemplateName getNameToSubstitute() const
- public clang::TemplateName getUnderlying() const
- public bool isDependent() const
- public bool isInstantiationDependent() const
- public bool isNull() const
- public void print(llvm::raw_ostream & OS, const clang::PrintingPolicy & Policy, clang::TemplateName::Qualified Qual = Qualified::AsWritten) const
Methods
¶void Profile(llvm::FoldingSetNodeID& ID)
void Profile(llvm::FoldingSetNodeID& ID)
Declared at: clang/include/clang/AST/TemplateName.h:344
Parameters
¶TemplateName()
TemplateName()
Declared at: clang/include/clang/AST/TemplateName.h:240
¶TemplateName(void* Ptr)
TemplateName(void* Ptr)
Declared at: clang/include/clang/AST/TemplateName.h:203
Parameters
- void* Ptr
¶TemplateName(clang::UsingShadowDecl* Using)
TemplateName(clang::UsingShadowDecl* Using)
Declared at: clang/include/clang/AST/TemplateName.h:248
Parameters
- clang::UsingShadowDecl* Using
¶TemplateName(clang::DependentTemplateName* Dep)
TemplateName(clang::DependentTemplateName* Dep)
Declared at: clang/include/clang/AST/TemplateName.h:247
Parameters
¶TemplateName(clang::QualifiedTemplateName* Qual)
TemplateName(clang::QualifiedTemplateName* Qual)
Declared at: clang/include/clang/AST/TemplateName.h:246
Parameters
¶TemplateName(
clang::SubstTemplateTemplateParmPackStorage*
Storage)
TemplateName(
clang::SubstTemplateTemplateParmPackStorage*
Storage)
Declared at: clang/include/clang/AST/TemplateName.h:245
Parameters
¶TemplateName(
clang::SubstTemplateTemplateParmStorage*
Storage)
TemplateName(
clang::SubstTemplateTemplateParmStorage*
Storage)
Declared at: clang/include/clang/AST/TemplateName.h:244
Parameters
¶TemplateName(
clang::AssumedTemplateStorage* Storage)
TemplateName(
clang::AssumedTemplateStorage* Storage)
Declared at: clang/include/clang/AST/TemplateName.h:243
Parameters
- clang::AssumedTemplateStorage* Storage
¶TemplateName(
clang::OverloadedTemplateStorage* Storage)
TemplateName(
clang::OverloadedTemplateStorage* Storage)
Declared at: clang/include/clang/AST/TemplateName.h:242
Parameters
- clang::OverloadedTemplateStorage* Storage
¶TemplateName(clang::TemplateDecl* Template)
TemplateName(clang::TemplateDecl* Template)
Declared at: clang/include/clang/AST/TemplateName.h:241
Parameters
- clang::TemplateDecl* Template
¶bool containsUnexpandedParameterPack() const
bool containsUnexpandedParameterPack() const
Description
Determines whether this template name contains an unexpanded parameter pack (for C++0x variadic templates).
Declared at: clang/include/clang/AST/TemplateName.h:323
¶void dump() const
void dump() const
Description
Debugging aid that dumps the template name to standard error.
Declared at: clang/include/clang/AST/TemplateName.h:342
¶void dump(llvm::raw_ostream& OS) const
void dump(llvm::raw_ostream& OS) const
Description
Debugging aid that dumps the template name.
Declared at: clang/include/clang/AST/TemplateName.h:338
Parameters
¶clang::AssumedTemplateStorage*
getAsAssumedTemplateName() const
clang::AssumedTemplateStorage*
getAsAssumedTemplateName() const
Description
Retrieve information on a name that has been assumed to be a template-name in order to permit a call via ADL.
Declared at: clang/include/clang/AST/TemplateName.h:276
¶clang::DependentTemplateName*
getAsDependentTemplateName() const
clang::DependentTemplateName*
getAsDependentTemplateName() const
Description
Retrieve the underlying dependent template name structure, if any.
Declared at: clang/include/clang/AST/TemplateName.h:299
¶clang::OverloadedTemplateStorage*
getAsOverloadedTemplate() const
clang::OverloadedTemplateStorage*
getAsOverloadedTemplate() const
Description
Retrieve the underlying, overloaded function template declarations that this template name refers to, if known.
Declared at: clang/include/clang/AST/TemplateName.h:272
Returns
The set of overloaded function templates that this template name refers to, if known. If the template name does not refer to a specific set of function templates because it is a dependent name or refers to a single template, returns NULL.
¶clang::QualifiedTemplateName*
getAsQualifiedTemplateName() const
clang::QualifiedTemplateName*
getAsQualifiedTemplateName() const
Description
Retrieve the underlying qualified template name structure, if any.
Declared at: clang/include/clang/AST/TemplateName.h:295
¶clang::SubstTemplateTemplateParmStorage*
getAsSubstTemplateTemplateParm() const
clang::SubstTemplateTemplateParmStorage*
getAsSubstTemplateTemplateParm() const
Description
Retrieve the substituted template template parameter, if known.
Declared at: clang/include/clang/AST/TemplateName.h:283
Returns
The storage for the substituted template template parameter, if known. Otherwise, returns NULL.
¶clang::SubstTemplateTemplateParmPackStorage*
getAsSubstTemplateTemplateParmPack() const
clang::SubstTemplateTemplateParmPackStorage*
getAsSubstTemplateTemplateParmPack() const
Description
Retrieve the substituted template template parameter pack, if known.
Declared at: clang/include/clang/AST/TemplateName.h:291
Returns
The storage for the substituted template template parameter pack, if known. Otherwise, returns NULL.
¶clang::TemplateDecl* getAsTemplateDecl() const
clang::TemplateDecl* getAsTemplateDecl() const
Description
Retrieve the underlying template declaration that this template name refers to, if known.
Declared at: clang/include/clang/AST/TemplateName.h:263
Returns
The template declaration that this template name refers to, if any. If the template name does not refer to a specific declaration because it is a dependent name, or if it refers to a set of function templates, returns NULL.
¶clang::UsingShadowDecl* getAsUsingShadowDecl()
const
clang::UsingShadowDecl* getAsUsingShadowDecl()
const
Description
Retrieve the using shadow declaration through which the underlying template declaration is introduced, if any.
Declared at: clang/include/clang/AST/TemplateName.h:303
¶void* getAsVoidPointer() const
void* getAsVoidPointer() const
Description
Retrieve the template name as a void pointer.
Declared at: clang/include/clang/AST/TemplateName.h:349
¶clang::TemplateNameDependence getDependence()
const
clang::TemplateNameDependence getDependence()
const
Declared at: clang/include/clang/AST/TemplateName.h:312
¶static clang::TemplateName getFromVoidPointer(
void* Ptr)
static clang::TemplateName getFromVoidPointer(
void* Ptr)
Description
Build a template name from a void pointer.
Declared at: clang/include/clang/AST/TemplateName.h:352
Parameters
- void* Ptr
¶clang::TemplateName::NameKind getKind() const
clang::TemplateName::NameKind getKind() const
Declared at: clang/include/clang/AST/TemplateName.h:254
¶clang::TemplateName getNameToSubstitute() const
clang::TemplateName getNameToSubstitute() const
Description
Get the template name to substitute when this template name is used as a template template argument. This refers to the most recent declaration of the template, including any default template arguments.
Declared at: clang/include/clang/AST/TemplateName.h:310
¶clang::TemplateName getUnderlying() const
clang::TemplateName getUnderlying() const
Declared at: clang/include/clang/AST/TemplateName.h:305
¶bool isDependent() const
bool isDependent() const
Description
Determines whether this is a dependent template name.
Declared at: clang/include/clang/AST/TemplateName.h:315
¶bool isInstantiationDependent() const
bool isInstantiationDependent() const
Description
Determines whether this is a template name that somehow depends on a template parameter.
Declared at: clang/include/clang/AST/TemplateName.h:319
¶bool isNull() const
bool isNull() const
Description
Determine whether this template name is NULL.
Declared at: clang/include/clang/AST/TemplateName.h:251
¶void print(llvm::raw_ostream& OS,
const clang::PrintingPolicy& Policy,
clang::TemplateName::Qualified Qual =
Qualified::AsWritten) const
void print(llvm::raw_ostream& OS,
const clang::PrintingPolicy& Policy,
clang::TemplateName::Qualified Qual =
Qualified::AsWritten) const
Description
Print the template name.
Declared at: clang/include/clang/AST/TemplateName.h:334
Parameters
- llvm::raw_ostream& OS
- the output stream to which the template name will be printed.
- const clang::PrintingPolicy& Policy
- clang::TemplateName::Qualified Qual = Qualified::AsWritten
- print the (Qualified::None) simple name, (Qualified::AsWritten) any written (possibly partial) qualifier, or (Qualified::Fully) the fully qualified name.