clang
15.0.0git
|
Captures a template argument whose value has been deduced via c++ template argument deduction. More...
#include "clang/Sema/Template.h"
Public Member Functions | |
DeducedTemplateArgument ()=default | |
DeducedTemplateArgument (const TemplateArgument &Arg, bool DeducedFromArrayBound=false) | |
DeducedTemplateArgument (ASTContext &Ctx, const llvm::APSInt &Value, QualType ValueType, bool DeducedFromArrayBound) | |
Construct an integral non-type template argument that has been deduced, possibly from an array bound. More... | |
bool | wasDeducedFromArrayBound () const |
For a non-type template argument, determine whether the template argument was deduced from an array bound. More... | |
void | setDeducedFromArrayBound (bool Deduced) |
Specify whether the given non-type template argument was deduced from an array bound. More... | |
![]() | |
constexpr | TemplateArgument () |
Construct an empty, invalid template argument. More... | |
TemplateArgument (QualType T, bool isNullPtr=false) | |
Construct a template type argument. More... | |
TemplateArgument (ValueDecl *D, QualType QT) | |
Construct a template argument that refers to a declaration, which is either an external declaration or a template declaration. More... | |
TemplateArgument (ASTContext &Ctx, const llvm::APSInt &Value, QualType Type) | |
Construct an integral constant template argument. More... | |
TemplateArgument (const TemplateArgument &Other, QualType Type) | |
Construct an integral constant template argument with the same value as Other but a different type. More... | |
TemplateArgument (TemplateName Name) | |
Construct a template argument that is a template. More... | |
TemplateArgument (TemplateName Name, Optional< unsigned > NumExpansions) | |
Construct a template argument that is a template pack expansion. More... | |
TemplateArgument (Expr *E) | |
Construct a template argument that is an expression. More... | |
TemplateArgument (ArrayRef< TemplateArgument > Args) | |
Construct a template argument that is a template argument pack. More... | |
TemplateArgument (TemplateName, bool)=delete | |
ArgKind | getKind () const |
Return the kind of stored template argument. More... | |
bool | isNull () const |
Determine whether this template argument has no value. More... | |
TemplateArgumentDependence | getDependence () const |
bool | isDependent () const |
Whether this template argument is dependent on a template parameter such that its result can change from one instantiation to another. More... | |
bool | isInstantiationDependent () const |
Whether this template argument is dependent on a template parameter. More... | |
bool | containsUnexpandedParameterPack () const |
Whether this template argument contains an unexpanded parameter pack. More... | |
bool | isPackExpansion () const |
Determine whether this template argument is a pack expansion. More... | |
QualType | getAsType () const |
Retrieve the type for a type template argument. More... | |
ValueDecl * | getAsDecl () const |
Retrieve the declaration for a declaration non-type template argument. More... | |
QualType | getParamTypeForDecl () const |
QualType | getNullPtrType () const |
Retrieve the type for null non-type template argument. More... | |
TemplateName | getAsTemplate () const |
Retrieve the template name for a template name argument. More... | |
TemplateName | getAsTemplateOrTemplatePattern () const |
Retrieve the template argument as a template name; if the argument is a pack expansion, return the pattern as a template name. More... | |
Optional< unsigned > | getNumTemplateExpansions () const |
Retrieve the number of expansions that a template template argument expansion will produce, if known. More... | |
llvm::APSInt | getAsIntegral () const |
Retrieve the template argument as an integral value. More... | |
QualType | getIntegralType () const |
Retrieve the type of the integral value. More... | |
void | setIntegralType (QualType T) |
QualType | getNonTypeTemplateArgumentType () const |
If this is a non-type template argument, get its type. More... | |
Expr * | getAsExpr () const |
Retrieve the template argument as an expression. More... | |
pack_iterator | pack_begin () const |
Iterator referencing the first argument of a template argument pack. More... | |
pack_iterator | pack_end () const |
Iterator referencing one past the last argument of a template argument pack. More... | |
ArrayRef< TemplateArgument > | pack_elements () const |
Iterator range referencing all of the elements of a template argument pack. More... | |
unsigned | pack_size () const |
The number of template arguments in the given template argument pack. More... | |
ArrayRef< TemplateArgument > | getPackAsArray () const |
Return the array of arguments in this template argument pack. More... | |
bool | structurallyEquals (const TemplateArgument &Other) const |
Determines whether two template arguments are superficially the same. More... | |
TemplateArgument | getPackExpansionPattern () const |
When the template argument is a pack expansion, returns the pattern of the pack expansion. More... | |
void | print (const PrintingPolicy &Policy, raw_ostream &Out, bool IncludeType) const |
Print this template argument to the given output stream. More... | |
void | dump (raw_ostream &Out) const |
Debugging aid that dumps the template argument. More... | |
void | dump () const |
Debugging aid that dumps the template argument to standard error. More... | |
void | Profile (llvm::FoldingSetNodeID &ID, const ASTContext &Context) const |
Used to insert TemplateArguments into FoldingSets. More... | |
Additional Inherited Members | |
![]() | |
enum | ArgKind { Null = 0, Type, Declaration, NullPtr, Integral, Template, TemplateExpansion, Expression, Pack } |
The kind of template argument we're storing. More... | |
using | pack_iterator = const TemplateArgument * |
Iterator that traverses the elements of a template argument pack. More... | |
![]() | |
static TemplateArgument | getEmptyPack () |
static TemplateArgument | CreatePackCopy (ASTContext &Context, ArrayRef< TemplateArgument > Args) |
Create a new template argument pack by copying the given set of template arguments. More... | |
Captures a template argument whose value has been deduced via c++ template argument deduction.
Definition at line 232 of file Template.h.
|
default |
|
inline |
Definition at line 240 of file Template.h.
|
inline |
Construct an integral non-type template argument that has been deduced, possibly from an array bound.
Definition at line 246 of file Template.h.
|
inline |
Specify whether the given non-type template argument was deduced from an array bound.
Definition at line 259 of file Template.h.
|
inline |
For a non-type template argument, determine whether the template argument was deduced from an array bound.
Definition at line 255 of file Template.h.
Referenced by checkDeducedTemplateArguments().