class TemplateParmPosition

Declaration

class TemplateParmPosition { /* full declaration omitted */ };

Description

Defines the position of a template parameter within a template parameter list. Because template parameter can be listed sequentially for out-of-line template members, each template parameter is given a Depth - the nesting of template parameter scopes - and a Position - the occurrence within the parameter list. This class is inheritedly privately by different kinds of template parameters and is not part of the Decl hierarchy. Just a facility.

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

Member Variables

protected unsigned int Depth
protected unsigned int Position
protected static const unsigned int MaxDepth = (1U << DepthWidth) - 1
protected static const unsigned int MaxPosition = (1U << PositionWidth) - 1

Method Overview

Methods

TemplateParmPosition(unsigned int D,
                     unsigned int P)

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

Parameters

unsigned int D
unsigned int P

TemplateParmPosition()

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

unsigned int getDepth() const

Description

Get the nesting depth of the template parameter.

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

unsigned int getIndex() const

Description

Get the index of the template parameter within its parameter list.

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

unsigned int getPosition() const

Description

Get the position of the template parameter within its parameter list.

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

void setDepth(unsigned int D)

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

Parameters

unsigned int D

void setPosition(unsigned int P)

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

Parameters

unsigned int P