class PackExpansionExpr

Declaration

class PackExpansionExpr : public Expr { /* full declaration omitted */ };

Description

Represents a C++11 pack expansion that produces a sequence of expressions. A pack expansion expression contains a pattern (which itself is an expression) followed by an ellipsis. For example: Here, the argument to the function object \c f is a pack expansion whose pattern is \c static_cast<Types&&>(args). When the \c forward function template is instantiated, the pack expansion will instantiate to zero or or more function arguments to the function object \c f.

Declared at: clang/include/clang/AST/ExprCXX.h:4068

Inherits from: Expr

Member Variables

private clang::SourceLocation EllipsisLoc
private unsigned int NumExpansions
When zero, the number of expansions is not known. Otherwise, this value is the number of expansions + 1.
private clang::Stmt* Pattern

Inherited from Stmt:

protected

Method Overview

Inherited from Expr:

Inherited from ValueStmt:

Inherited from Stmt:

Methods

PackExpansionExpr(
    clang::QualType T,
    clang::Expr* Pattern,
    clang::SourceLocation EllipsisLoc,
    Optional<unsigned int> NumExpansions)

Declared at: clang/include/clang/AST/ExprCXX.h:4084

Parameters

clang::QualType T
clang::Expr* Pattern
clang::SourceLocation EllipsisLoc
Optional<unsigned int> NumExpansions

PackExpansionExpr(clang::Stmt::EmptyShell Empty)

Declared at: clang/include/clang/AST/ExprCXX.h:4094

Parameters

clang::Stmt::EmptyShell Empty

clang::Stmt::child_range children()

Declared at: clang/include/clang/AST/ExprCXX.h:4126

clang::Stmt::const_child_range children() const

Declared at: clang/include/clang/AST/ExprCXX.h:4130

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

Declared at: clang/include/clang/AST/ExprCXX.h:4121

Parameters

const clang::Stmt* T

clang::SourceLocation getBeginLoc() const

Declared at: clang/include/clang/AST/ExprCXX.h:4115

clang::SourceLocation getEllipsisLoc() const

Description

Retrieve the location of the ellipsis that describes this pack expansion.

Declared at: clang/include/clang/AST/ExprCXX.h:4104

clang::SourceLocation getEndLoc() const

Declared at: clang/include/clang/AST/ExprCXX.h:4119

Optional<unsigned int> getNumExpansions() const

Description

Determine the number of expansions that will be produced when this pack expansion is instantiated, if already known.

Declared at: clang/include/clang/AST/ExprCXX.h:4108

clang::Expr* getPattern()

Description

Retrieve the pattern of the pack expansion.

Declared at: clang/include/clang/AST/ExprCXX.h:4097

const clang::Expr* getPattern() const

Description

Retrieve the pattern of the pack expansion.

Declared at: clang/include/clang/AST/ExprCXX.h:4100