clang API Documentation

Public Member Functions | Static Public Member Functions | Friends
clang::ClassTemplatePartialSpecializationDecl Class Reference

#include <DeclTemplate.h>

Inheritance diagram for clang::ClassTemplatePartialSpecializationDecl:
Inheritance graph
[legend]
Collaboration diagram for clang::ClassTemplatePartialSpecializationDecl:
Collaboration graph
[legend]

List of all members.

Public Member Functions

ClassTemplatePartialSpecializationDeclgetMostRecentDecl ()
 Returns the most recent (re)declaration of this declaration.
TemplateParameterListgetTemplateParameters () const
 Get the list of template parameters.
const ASTTemplateArgumentListInfogetTemplateArgsAsWritten () const
 Get the template arguments as written.
ClassTemplatePartialSpecializationDeclgetInstantiatedFromMember ()
 Retrieve the member class template partial specialization from which this particular class template partial specialization was instantiated.
void setInstantiatedFromMember (ClassTemplatePartialSpecializationDecl *PartialSpec)
bool isMemberSpecialization ()
 Determines whether this class template partial specialization template was a specialization of a member partial specialization.
void setMemberSpecialization ()
 Note that this member template is a specialization.
QualType getInjectedSpecializationType () const

Static Public Member Functions

static
ClassTemplatePartialSpecializationDecl
Create (ASTContext &Context, TagKind TK, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, TemplateParameterList *Params, ClassTemplateDecl *SpecializedTemplate, const TemplateArgument *Args, unsigned NumArgs, const TemplateArgumentListInfo &ArgInfos, QualType CanonInjectedType, ClassTemplatePartialSpecializationDecl *PrevDecl)
static
ClassTemplatePartialSpecializationDecl
CreateDeserialized (ASTContext &C, unsigned ID)
static bool classof (const Decl *D)
static bool classofKind (Kind K)

Friends

class ASTDeclReader
class ASTDeclWriter

Detailed Description

Definition at line 1650 of file DeclTemplate.h.


Member Function Documentation

static bool clang::ClassTemplatePartialSpecializationDecl::classof ( const Decl D) [inline, static]

Reimplemented from clang::ClassTemplateSpecializationDecl.

Definition at line 1791 of file DeclTemplate.h.

References classofKind(), and clang::Decl::getKind().

Reimplemented from clang::ClassTemplateSpecializationDecl.

Definition at line 1792 of file DeclTemplate.h.

Referenced by classof().

ClassTemplatePartialSpecializationDecl * ClassTemplatePartialSpecializationDecl::Create ( ASTContext Context,
TagKind  TK,
DeclContext DC,
SourceLocation  StartLoc,
SourceLocation  IdLoc,
TemplateParameterList Params,
ClassTemplateDecl SpecializedTemplate,
const TemplateArgument Args,
unsigned  NumArgs,
const TemplateArgumentListInfo ArgInfos,
QualType  CanonInjectedType,
ClassTemplatePartialSpecializationDecl PrevDecl 
) [static]

Retrieves the injected specialization type for this partial specialization. This is not the same as the type-decl-type for this partial specialization, which is an InjectedClassNameType.

Definition at line 1783 of file DeclTemplate.h.

References clang::TypeDecl::getTypeForDecl().

Referenced by clang::Sema::getMoreSpecializedPartialSpecialization().

Retrieve the member class template partial specialization from which this particular class template partial specialization was instantiated.

 template<typename T>
 struct Outer {
   template<typename U> struct Inner;
   template<typename U> struct Inner<U*> { }; // #1
 };

 Outer<float>::Inner<int*> ii;

In this example, the instantiation of Outer<float>::Inner<int*> will end up instantiating the partial specialization Outer<float>::Inner<U*>, which itself was instantiated from the class template partial specialization Outer<T>::Inner<U*>. Given Outer<float>::Inner<U*>, this function would return Outer<T>::Inner<U*>.

Definition at line 1736 of file DeclTemplate.h.

References clang::Redeclarable< TagDecl >::getFirstDecl().

Referenced by clang::Sema::ActOnClassTemplateSpecialization(), clang::ClassTemplateSpecializationDecl::getSourceRange(), clang::Sema::InstantiateClassTemplateSpecialization(), isInstantiationOf(), and clang::ASTDeclWriter::VisitClassTemplatePartialSpecializationDecl().

Returns the most recent (re)declaration of this declaration.

Reimplemented from clang::ClassTemplateSpecializationDecl.

Definition at line 1700 of file DeclTemplate.h.

Determines whether this class template partial specialization template was a specialization of a member partial specialization.

In the following example, the member template partial specialization X<int>::Inner<T*> is a member specialization.

 template<typename T>
 struct X {
   template<typename U> struct Inner;
   template<typename U> struct Inner<U*>;
 };

 template<> template<typename T>
 struct X<int>::Inner<T*> { /* ... */ };

Definition at line 1765 of file DeclTemplate.h.

References clang::Redeclarable< TagDecl >::getFirstDecl().

Referenced by clang::Sema::InstantiateClassTemplateSpecialization(), and clang::ASTDeclWriter::VisitClassTemplatePartialSpecializationDecl().

Note that this member template is a specialization.

Definition at line 1772 of file DeclTemplate.h.

References clang::Redeclarable< TagDecl >::getFirstDecl().

Referenced by clang::Sema::ActOnClassTemplateSpecialization().


Friends And Related Function Documentation

friend class ASTDeclReader [friend]

Reimplemented from clang::ClassTemplateSpecializationDecl.

Definition at line 1796 of file DeclTemplate.h.

friend class ASTDeclWriter [friend]

Reimplemented from clang::ClassTemplateSpecializationDecl.

Definition at line 1797 of file DeclTemplate.h.


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