class ClassTemplateDecl

Declaration

class ClassTemplateDecl : public RedeclarableTemplateDecl { /* full declaration omitted */ };

Description

Declaration of a class template.

Declared at: clang/include/clang/AST/DeclTemplate.h:2273

Inherits from: RedeclarableTemplateDecl

Member Variables

Inherited from RedeclarableTemplateDecl:

protected Common = nullptr

Inherited from TemplateDecl:

protected TemplatedDecl
protected TemplateParams

Inherited from Decl:

protected NextInContextAndBits
protected Access
protected FromASTFile
protected IdentifierNamespace
protected CacheValidAndLinkage

Method Overview

Inherited from RedeclarableTemplateDecl:

Inherited from TemplateDecl:

Inherited from NamedDecl:

Inherited from Decl:

Methods

void AddPartialSpecialization(
    clang::ClassTemplatePartialSpecializationDecl*
        D,
    void* InsertPos)

Description

Insert the specified partial specialization knowing that it is not already in. InsertPos must be obtained from findPartialSpecialization.

Declared at: clang/include/clang/AST/DeclTemplate.h:2392

Parameters

clang::ClassTemplatePartialSpecializationDecl* D
void* InsertPos

void AddSpecialization(
    clang::ClassTemplateSpecializationDecl* D,
    void* InsertPos)

Description

Insert the specified specialization knowing that it is not already in. InsertPos must be obtained from findSpecialization.

Declared at: clang/include/clang/AST/DeclTemplate.h:2348

Parameters

clang::ClassTemplateSpecializationDecl* D
void* InsertPos

ClassTemplateDecl(
    clang::ASTContext& C,
    clang::DeclContext* DC,
    clang::SourceLocation L,
    clang::DeclarationName Name,
    clang::TemplateParameterList* Params,
    clang::NamedDecl* Decl)

Declared at: clang/include/clang/AST/DeclTemplate.h:2302

Parameters

clang::ASTContext& C
clang::DeclContext* DC
clang::SourceLocation L
clang::DeclarationName Name
clang::TemplateParameterList* Params
clang::NamedDecl* Decl

static clang::ClassTemplateDecl* Create(
    clang::ASTContext& C,
    clang::DeclContext* DC,
    clang::SourceLocation L,
    clang::DeclarationName Name,
    clang::TemplateParameterList* Params,
    clang::NamedDecl* Decl)

Description

Create a class template node.

Declared at: clang/include/clang/AST/DeclTemplate.h:2332

Parameters

clang::ASTContext& C
clang::DeclContext* DC
clang::SourceLocation L
clang::DeclarationName Name
clang::TemplateParameterList* Params
clang::NamedDecl* Decl

static clang::ClassTemplateDecl*
CreateDeserialized(clang::ASTContext& C,
                   unsigned int ID)

Description

Create an empty class template node.

Declared at: clang/include/clang/AST/DeclTemplate.h:2339

Parameters

clang::ASTContext& C
unsigned int ID

void LoadLazySpecializations() const

Description

Load any lazily-loaded specializations from the external source.

Declared at: clang/include/clang/AST/DeclTemplate.h:2318

static bool classof(const clang::Decl* D)

Declared at: clang/include/clang/AST/DeclTemplate.h:2453

Parameters

const clang::Decl* D

static bool classofKind(clang::Decl::Kind K)

Declared at: clang/include/clang/AST/DeclTemplate.h:2454

Parameters

clang::Decl::Kind K

clang::ClassTemplatePartialSpecializationDecl*
findPartialSpecInstantiatedFromMember(
    clang::ClassTemplatePartialSpecializationDecl*
        D)

Description

Find a class template partial specialization which was instantiated from the given member partial specialization.

Declared at: clang/include/clang/AST/DeclTemplate.h:2418

Parameters

clang::ClassTemplatePartialSpecializationDecl* D
a member class template partial specialization.

Returns

the class template partial specialization which was instantiated from the given member partial specialization, or nullptr if no such partial specialization exists.

clang::ClassTemplatePartialSpecializationDecl*
findPartialSpecialization(clang::QualType T)

Description

Find a class template partial specialization with the given type T.

Declared at: clang/include/clang/AST/DeclTemplate.h:2407

Parameters

clang::QualType T
a dependent type that names a specialization of this class template.

Returns

the class template partial specialization that exactly matches the type \p T, or nullptr if no such partial specialization exists.

clang::ClassTemplatePartialSpecializationDecl*
findPartialSpecialization(
    ArrayRef<clang::TemplateArgument> Args,
    clang::TemplateParameterList* TPL,
    void*& InsertPos)

Description

Return the partial specialization with the provided arguments if it exists, otherwise return the insertion point.

Declared at: clang/include/clang/AST/DeclTemplate.h:2387

Parameters

ArrayRef<clang::TemplateArgument> Args
clang::TemplateParameterList* TPL
void*& InsertPos

clang::ClassTemplateSpecializationDecl*
findSpecialization(
    ArrayRef<clang::TemplateArgument> Args,
    void*& InsertPos)

Description

Return the specialization with the provided arguments if it exists, otherwise return the insertion point.

Declared at: clang/include/clang/AST/DeclTemplate.h:2344

Parameters

ArrayRef<clang::TemplateArgument> Args
void*& InsertPos

clang::ClassTemplateDecl* getCanonicalDecl()

Description

Retrieves the canonical declaration of this template.

Declared at: clang/include/clang/AST/DeclTemplate.h:2350

const clang::ClassTemplateDecl* getCanonicalDecl()
    const

Declared at: clang/include/clang/AST/DeclTemplate.h:2354

clang::ClassTemplateDecl::Common* getCommonPtr()
    const

Declared at: clang/include/clang/AST/DeclTemplate.h:2309

clang::QualType
getInjectedClassNameSpecialization()

Description

Retrieve the template specialization type of the injected-class-name for this class template. The injected-class-name for a class template \c X is \c X<template-args>, where \c template-args is formed from the template arguments that correspond to the template parameters of\c X. For example:

Declared at: clang/include/clang/AST/DeclTemplate.h:2435

clang::ClassTemplateDecl*
getInstantiatedFromMemberTemplate() const

Declared at: clang/include/clang/AST/DeclTemplate.h:2379

clang::ClassTemplateDecl* getMostRecentDecl()

Declared at: clang/include/clang/AST/DeclTemplate.h:2371

const clang::ClassTemplateDecl*
getMostRecentDecl() const

Declared at: clang/include/clang/AST/DeclTemplate.h:2375

void getPartialSpecializations(
    SmallVectorImpl<
        clang::
            ClassTemplatePartialSpecializationDecl*>&
        PS) const

Description

Retrieve the partial specializations as an ordered list.

Declared at: clang/include/clang/AST/DeclTemplate.h:2396

Parameters

SmallVectorImpl< clang:: ClassTemplatePartialSpecializationDecl*>& PS

llvm::FoldingSetVector<
    ClassTemplatePartialSpecializationDecl>&
getPartialSpecializations() const

Description

Retrieve the set of partial specializations of this class template.

Declared at: clang/include/clang/AST/DeclTemplate.h:2300

const clang::ClassTemplateDecl* getPreviousDecl()
    const

Declared at: clang/include/clang/AST/DeclTemplate.h:2365

clang::ClassTemplateDecl* getPreviousDecl()

Description

Retrieve the previous declaration of this class template, or nullptr if no such declaration exists.

Declared at: clang/include/clang/AST/DeclTemplate.h:2361

llvm::FoldingSetVector<
    ClassTemplateSpecializationDecl>&
getSpecializations() const

Description

Retrieve the set of specializations of this class template.

Declared at: clang/include/clang/AST/DeclTemplate.h:2295

clang::CXXRecordDecl* getTemplatedDecl() const

Description

Get the underlying class declarations of the template.

Declared at: clang/include/clang/AST/DeclTemplate.h:2321

bool isThisDeclarationADefinition() const

Description

Returns whether this template declaration defines the primary class pattern.

Declared at: clang/include/clang/AST/DeclTemplate.h:2327

clang::RedeclarableTemplateDecl::CommonBase*
newCommon(clang::ASTContext& C) const

Declared at: clang/include/clang/AST/DeclTemplate.h:2307

Parameters

clang::ASTContext& C

clang::ClassTemplateDecl::spec_iterator
spec_begin() const

Declared at: clang/include/clang/AST/DeclTemplate.h:2444

clang::ClassTemplateDecl::spec_iterator spec_end()
    const

Declared at: clang/include/clang/AST/DeclTemplate.h:2448

clang::ClassTemplateDecl::spec_range
specializations() const

Declared at: clang/include/clang/AST/DeclTemplate.h:2440