clang 20.0.0git
|
Defines the position of a template parameter within a template parameter list. More...
#include "clang/AST/DeclTemplate.h"
Public Member Functions | |
TemplateParmPosition ()=delete | |
unsigned | getDepth () const |
Get the nesting depth of the template parameter. | |
void | setDepth (unsigned D) |
unsigned | getPosition () const |
Get the position of the template parameter within its parameter list. | |
void | setPosition (unsigned P) |
unsigned | getIndex () const |
Get the index of the template parameter within its parameter list. | |
Protected Types | |
enum | { DepthWidth = 20 , PositionWidth = 12 } |
Protected Member Functions | |
TemplateParmPosition (unsigned D, unsigned P) | |
Protected Attributes | |
unsigned | Depth: DepthWidth |
unsigned | Position: PositionWidth |
Static Protected Attributes | |
static constexpr unsigned | MaxDepth = (1U << DepthWidth) - 1 |
static constexpr unsigned | MaxPosition = (1U << PositionWidth) - 1 |
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.
Definition at line 1112 of file DeclTemplate.h.
|
protected |
Enumerator | |
---|---|
DepthWidth | |
PositionWidth |
Definition at line 1114 of file DeclTemplate.h.
Definition at line 1121 of file DeclTemplate.h.
References D, MaxDepth, MaxPosition, and P.
|
delete |
|
inline |
Get the nesting depth of the template parameter.
Definition at line 1134 of file DeclTemplate.h.
References Depth.
|
inline |
Get the index of the template parameter within its parameter list.
Definition at line 1150 of file DeclTemplate.h.
References Position.
|
inline |
Get the position of the template parameter within its parameter list.
Definition at line 1142 of file DeclTemplate.h.
References Position.
|
inline |
Definition at line 1135 of file DeclTemplate.h.
|
inline |
Definition at line 1143 of file DeclTemplate.h.
References MaxPosition, P, and Position.
|
protected |
Definition at line 1115 of file DeclTemplate.h.
Referenced by getDepth(), and setDepth().
|
staticconstexprprotected |
Definition at line 1118 of file DeclTemplate.h.
Referenced by setDepth(), and TemplateParmPosition().
|
staticconstexprprotected |
Definition at line 1119 of file DeclTemplate.h.
Referenced by setPosition(), and TemplateParmPosition().
|
protected |
Definition at line 1116 of file DeclTemplate.h.
Referenced by getIndex(), getPosition(), and setPosition().