clang 18.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
clang::TemplateArgumentList Class Referencefinal

A template argument list. More...

#include "clang/AST/DeclTemplate.h"

Inheritance diagram for clang::TemplateArgumentList:
Inheritance graph
[legend]

Public Types

enum  OnStackType { OnStack }
 Type used to indicate that the template argument list itself is a stack object. More...
 

Public Member Functions

 TemplateArgumentList (const TemplateArgumentList &)=delete
 
TemplateArgumentListoperator= (const TemplateArgumentList &)=delete
 
 TemplateArgumentList (OnStackType, ArrayRef< TemplateArgument > Args)
 Construct a new, temporary template argument list on the stack.
 
 TemplateArgumentList (const TemplateArgumentList *Other)
 Produces a shallow copy of the given template argument list.
 
const TemplateArgumentget (unsigned Idx) const
 Retrieve the template argument at a given index.
 
const TemplateArgumentoperator[] (unsigned Idx) const
 Retrieve the template argument at a given index.
 
ArrayRef< TemplateArgumentasArray () const
 Produce this as an array ref.
 
unsigned size () const
 Retrieve the number of template arguments in this template argument list.
 
const TemplateArgumentdata () const
 Retrieve a pointer to the template argument list.
 

Static Public Member Functions

static TemplateArgumentListCreateCopy (ASTContext &Context, ArrayRef< TemplateArgument > Args)
 Create a new template argument list that copies the given set of template arguments.
 

Public Attributes

friend TrailingObjects
 

Detailed Description

A template argument list.

Definition at line 242 of file DeclTemplate.h.

Member Enumeration Documentation

◆ OnStackType

Type used to indicate that the template argument list itself is a stack object.

It does not own its template arguments.

Enumerator
OnStack 

Definition at line 263 of file DeclTemplate.h.

Constructor & Destructor Documentation

◆ TemplateArgumentList() [1/3]

clang::TemplateArgumentList::TemplateArgumentList ( const TemplateArgumentList )
delete

◆ TemplateArgumentList() [2/3]

clang::TemplateArgumentList::TemplateArgumentList ( OnStackType  ,
ArrayRef< TemplateArgument Args 
)
inlineexplicit

Construct a new, temporary template argument list on the stack.

The template argument list does not own the template arguments provided.

Definition at line 274 of file DeclTemplate.h.

◆ TemplateArgumentList() [3/3]

clang::TemplateArgumentList::TemplateArgumentList ( const TemplateArgumentList Other)
inlineexplicit

Produces a shallow copy of the given template argument list.

This operation assumes that the input argument list outlives it. This takes the list as a pointer to avoid looking like a copy constructor, since this really isn't safe to use that way.

Definition at line 282 of file DeclTemplate.h.

Member Function Documentation

◆ asArray()

ArrayRef< TemplateArgument > clang::TemplateArgumentList::asArray ( ) const
inline

◆ CreateCopy()

TemplateArgumentList * TemplateArgumentList::CreateCopy ( ASTContext Context,
ArrayRef< TemplateArgument Args 
)
static

◆ data()

const TemplateArgument * clang::TemplateArgumentList::data ( ) const
inline

Retrieve a pointer to the template argument list.

Definition at line 304 of file DeclTemplate.h.

Referenced by asArray(), get(), and clang::Sema::getTemplateArgumentBindingsText().

◆ get()

const TemplateArgument & clang::TemplateArgumentList::get ( unsigned  Idx) const
inline

◆ operator=()

TemplateArgumentList & clang::TemplateArgumentList::operator= ( const TemplateArgumentList )
delete

◆ operator[]()

const TemplateArgument & clang::TemplateArgumentList::operator[] ( unsigned  Idx) const
inline

Retrieve the template argument at a given index.

Definition at line 292 of file DeclTemplate.h.

References get().

◆ size()

unsigned clang::TemplateArgumentList::size ( ) const
inline

Member Data Documentation

◆ TrailingObjects

friend clang::TemplateArgumentList::TrailingObjects

Definition at line 256 of file DeclTemplate.h.


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