clang API Documentation
Represents a pack expansion of types. More...
#include <Type.h>
Public Member Functions | |
QualType | getPattern () const |
Retrieve the pattern of this pack expansion, which is the type that will be repeatedly instantiated when instantiating the pack expansion itself. | |
Optional< unsigned > | getNumExpansions () const |
Retrieve the number of expansions that this pack expansion will generate, if known. | |
bool | isSugared () const |
QualType | desugar () const |
void | Profile (llvm::FoldingSetNodeID &ID) |
Static Public Member Functions | |
static void | Profile (llvm::FoldingSetNodeID &ID, QualType Pattern, Optional< unsigned > NumExpansions) |
static bool | classof (const Type *T) |
Friends | |
class | ASTContext |
Represents a pack expansion of types.
Pack expansions are part of C++0x variadic templates. A pack expansion contains a pattern, which itself contains one or more "unexpanded" parameter packs. When instantiated, a pack expansion produces a series of types, each instantiated from the pattern of the expansion, where the Ith instantiation of the pattern uses the Ith arguments bound to each of the unexpanded parameter packs. The pack expansion is considered to "expand" these unexpanded parameter packs.
template<typename ...Types> struct tuple; template<typename ...Types> struct tuple_of_references { typedef tuple<Types&...> type; };
Here, the pack expansion Types&
... is represented via a PackExpansionType whose pattern is Types&.
static bool clang::PackExpansionType::classof | ( | const Type * | T | ) | [inline, static] |
Definition at line 4283 of file Type.h.
References clang::Type::getTypeClass().
QualType clang::PackExpansionType::desugar | ( | ) | const [inline] |
Optional<unsigned> clang::PackExpansionType::getNumExpansions | ( | ) | const [inline] |
Retrieve the number of expansions that this pack expansion will generate, if known.
Definition at line 4261 of file Type.h.
Referenced by clang::Sema::getTemplateArgumentPackExpansionPattern(), and clang::TreeTransform< Derived >::TransformFunctionTypeParams().
QualType clang::PackExpansionType::getPattern | ( | ) | const [inline] |
Retrieve the pattern of this pack expansion, which is the type that will be repeatedly instantiated when instantiating the pack expansion itself.
Definition at line 4257 of file Type.h.
Referenced by DeduceTemplateArguments(), and clang::Sema::DeduceTemplateArguments().
bool clang::PackExpansionType::isSugared | ( | ) | const [inline] |
Definition at line 4268 of file Type.h.
References clang::Type::isDependentType().
void clang::PackExpansionType::Profile | ( | llvm::FoldingSetNodeID & | ID | ) | [inline] |
Definition at line 4271 of file Type.h.
Referenced by clang::ASTContext::getPackExpansionType().
static void clang::PackExpansionType::Profile | ( | llvm::FoldingSetNodeID & | ID, |
QualType | Pattern, | ||
Optional< unsigned > | NumExpansions | ||
) | [inline, static] |
Definition at line 4275 of file Type.h.
References clang::QualType::getAsOpaquePtr().
friend class ASTContext [friend] |
Reimplemented from clang::Type.