class PackExpansionType

Declaration

class PackExpansionType : public Type, public Node { /* full declaration omitted */ };

Description

Represents a pack expansion of types. Pack expansions are part of C++11 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. Here, the pack expansion \c Types&... is represented via a PackExpansionType whose pattern is Types & .

Declared at: clang/include/clang/AST/Type.h:5767

Inherits from: Type, FoldingSetBase::Node

Member Variables

private clang::QualType Pattern
The pattern of the pack expansion.

Inherited from Type:

protected

Method Overview

  • private PackExpansionType(clang::QualType Pattern, clang::QualType Canon, Optional<unsigned int> NumExpansions)
  • public void Profile(llvm::FoldingSetNodeID & ID)
  • public static void Profile(llvm::FoldingSetNodeID & ID, clang::QualType Pattern, Optional<unsigned int> NumExpansions)
  • public static bool classof(const clang::Type * T)
  • public clang::QualType desugar() const
  • public Optional<unsigned int> getNumExpansions() const
  • public clang::QualType getPattern() const
  • public bool isSugared() const

Inherited from FoldingSetBase::Node:

Inherited from Type:

Inherited from ExtQualsTypeCommonBase:

    Methods

    PackExpansionType(
        clang::QualType Pattern,
        clang::QualType Canon,
        Optional<unsigned int> NumExpansions)

    Declared at: clang/include/clang/AST/Type.h:5773

    Parameters

    clang::QualType Pattern
    clang::QualType Canon
    Optional<unsigned int> NumExpansions

    void Profile(llvm::FoldingSetNodeID& ID)

    Declared at: clang/include/clang/AST/Type.h:5801

    Parameters

    llvm::FoldingSetNodeID& ID

    static void Profile(
        llvm::FoldingSetNodeID& ID,
        clang::QualType Pattern,
        Optional<unsigned int> NumExpansions)

    Declared at: clang/include/clang/AST/Type.h:5805

    Parameters

    llvm::FoldingSetNodeID& ID
    clang::QualType Pattern
    Optional<unsigned int> NumExpansions

    static bool classof(const clang::Type* T)

    Declared at: clang/include/clang/AST/Type.h:5813

    Parameters

    const clang::Type* T

    clang::QualType desugar() const

    Declared at: clang/include/clang/AST/Type.h:5799

    Optional<unsigned int> getNumExpansions() const

    Description

    Retrieve the number of expansions that this pack expansion will generate, if known.

    Declared at: clang/include/clang/AST/Type.h:5792

    clang::QualType getPattern() const

    Description

    Retrieve the pattern of this pack expansion, which is the type that will be repeatedly instantiated when instantiating the pack expansion itself.

    Declared at: clang/include/clang/AST/Type.h:5788

    bool isSugared() const

    Declared at: clang/include/clang/AST/Type.h:5798