clang API Documentation

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

#include <DeclTemplate.h>

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

List of all members.

Public Member Functions

VarTemplatePartialSpecializationDeclgetMostRecentDecl ()
 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.
VarTemplatePartialSpecializationDeclgetInstantiatedFromMember ()
 Retrieve the member variable template partial specialization from which this particular variable template partial specialization was instantiated.
void setInstantiatedFromMember (VarTemplatePartialSpecializationDecl *PartialSpec)
bool isMemberSpecialization ()
 Determines whether this variable template partial specialization was a specialization of a member partial specialization.
void setMemberSpecialization ()
 Note that this member template is a specialization.

Static Public Member Functions

static
VarTemplatePartialSpecializationDecl
Create (ASTContext &Context, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, TemplateParameterList *Params, VarTemplateDecl *SpecializedTemplate, QualType T, TypeSourceInfo *TInfo, StorageClass S, const TemplateArgument *Args, unsigned NumArgs, const TemplateArgumentListInfo &ArgInfos)
static
VarTemplatePartialSpecializationDecl
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 2507 of file DeclTemplate.h.


Member Function Documentation

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

Reimplemented from clang::VarTemplateSpecializationDecl.

Definition at line 2629 of file DeclTemplate.h.

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

Reimplemented from clang::VarTemplateSpecializationDecl.

Definition at line 2630 of file DeclTemplate.h.

Referenced by classof().

VarTemplatePartialSpecializationDecl * VarTemplatePartialSpecializationDecl::Create ( ASTContext Context,
DeclContext DC,
SourceLocation  StartLoc,
SourceLocation  IdLoc,
TemplateParameterList Params,
VarTemplateDecl SpecializedTemplate,
QualType  T,
TypeSourceInfo TInfo,
StorageClass  S,
const TemplateArgument Args,
unsigned  NumArgs,
const TemplateArgumentListInfo ArgInfos 
) [static]

Reimplemented from clang::VarTemplateSpecializationDecl.

Definition at line 1154 of file DeclTemplate.cpp.

References AttributeLangSupport::C.

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

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

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

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 variable template partial specialization Outer<T>::Inner<U*>. Given Outer<float>::Inner<U*>, this function would return Outer<T>::Inner<U*>.

Definition at line 2585 of file DeclTemplate.h.

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

Referenced by clang::Sema::ActOnVarTemplateSpecialization(), clang::Sema::InstantiateVariableDefinition(), and clang::ASTDeclWriter::VisitVarTemplatePartialSpecializationDecl().

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

Reimplemented from clang::VarTemplateSpecializationDecl.

Definition at line 2549 of file DeclTemplate.h.

Determines whether this variable template partial specialization 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> U Inner;
   template<typename U> U* Inner<U*> = (U*)(0);
 };

 template<> template<typename T>
 U* X<int>::Inner<T*> = (T*)(0) + 1;

Definition at line 2614 of file DeclTemplate.h.

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

Referenced by clang::Sema::InstantiateVariableDefinition(), and clang::ASTDeclWriter::VisitVarTemplatePartialSpecializationDecl().

Note that this member template is a specialization.

Definition at line 2621 of file DeclTemplate.h.

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

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


Friends And Related Function Documentation

friend class ASTDeclReader [friend]

Reimplemented from clang::VarTemplateSpecializationDecl.

Definition at line 2634 of file DeclTemplate.h.

friend class ASTDeclWriter [friend]

Reimplemented from clang::VarTemplateSpecializationDecl.

Definition at line 2635 of file DeclTemplate.h.


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