Argument tuple for variadic emplace/constructor calls. Stores arguments by (decayed) value. Restores original argument types with reference qualifiers and adornments at unpack time to emulate perfect forwarding.

Synopsis

Declared in <folly/container/Iterator.h>

template<typename... Args>
struct emplace_args
    : std::tuple<std::decay_t<Args>...>

Description

Uses inheritance instead of a type alias to std::tuple so that emplace iterators with implicit unpacking disabled can distinguish between emplace_args and std::tuple parameters.

Base Classes

Name

Description

std::tuple<std::decay_t<Args>...>

Types

Type Aliases

Name

Description

__trivially_relocatable

storage_type

The underlying tuple type storing the decayed arguments.

Member Functions

Name

Description

operator=

Assignment operators

swap

Using Declarations

Non-Member Functions

Name

Description

get_emplace_arg

Getter function for unpacking a single emplace argument from an lvalue pack.

get_emplace_arg

Getter function for unpacking a single emplace argument.

get_emplace_arg

Getter function for unpacking a single emplace argument from a const pack.

make_emplace_args

Pack arguments in a tuple for assignment to a folly::emplace_iterator, folly::front_emplace_iterator, or folly::back_emplace_iterator. The iterator's operator= will unpack the tuple and pass the unpacked arguments to the container's emplace function, which in turn forwards the arguments to the (multi‐argument) constructor of the target class.

Created with MrDocs