clang  3.8.0
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 <DeclTemplate.h>

Inheritance diagram for clang::TemplateArgumentList:
[legend]
Collaboration diagram for clang::TemplateArgumentList:
[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 (OnStackType, const TemplateArgument *Args, unsigned NumArgs)
 Construct a new, temporary template argument list on the stack. More...
 
 TemplateArgumentList (const TemplateArgumentList *Other)
 Produces a shallow copy of the given template argument list. More...
 
const TemplateArgumentget (unsigned Idx) const
 Retrieve the template argument at a given index. More...
 
const TemplateArgumentoperator[] (unsigned Idx) const
 Retrieve the template argument at a given index. More...
 
ArrayRef< TemplateArgumentasArray () const
 Produce this as an array ref. More...
 
unsigned size () const
 Retrieve the number of template arguments in this template argument list. More...
 
const TemplateArgumentdata () const
 Retrieve a pointer to the template argument list. More...
 

Static Public Member Functions

static TemplateArgumentListCreateCopy (ASTContext &Context, const TemplateArgument *Args, unsigned NumArgs)
 Create a new template argument list that copies the given set of template arguments. More...
 

Public Attributes

friend TrailingObjects
 

Detailed Description

A template argument list.

Definition at line 172 of file DeclTemplate.h.

Member Enumeration Documentation

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 191 of file DeclTemplate.h.

Constructor & Destructor Documentation

clang::TemplateArgumentList::TemplateArgumentList ( OnStackType  ,
const TemplateArgument Args,
unsigned  NumArgs 
)
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 203 of file DeclTemplate.h.

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 really isn't safe to use that way.

Definition at line 213 of file DeclTemplate.h.

Member Function Documentation

ArrayRef<TemplateArgument> clang::TemplateArgumentList::asArray ( ) const
inline
TemplateArgumentList * TemplateArgumentList::CreateCopy ( ASTContext Context,
const TemplateArgument Args,
unsigned  NumArgs 
)
static
const TemplateArgument* clang::TemplateArgumentList::data ( ) const
inline
const TemplateArgument& clang::TemplateArgumentList::get ( unsigned  Idx) const
inline

Retrieve the template argument at a given index.

Definition at line 217 of file DeclTemplate.h.

References data().

Referenced by clang::ASTWriter::AddTemplateArgumentList(), clang::PredefinedExpr::ComputeName(), IsStructurallyEquivalent(), and clang::Sema::SubstituteExplicitTemplateArguments().

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

Retrieve the template argument at a given index.

Definition at line 223 of file DeclTemplate.h.

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

Member Data Documentation

friend clang::TemplateArgumentList::TrailingObjects

Definition at line 237 of file DeclTemplate.h.


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