bsl::stack::emplace

Emplace a newly constructed value_type onto this stack.

Synopsis

Declared in <bslstl_stack.h>

template<class... Args>
stack<VALUE, CONTAINER>::reference
emplace(Args&&... args);

Description

Push onto this stack a newly created value_type object constructed by forwarding get_allocator() (if required) and the specified (variable number of) args to the corresponding constructor of value_type. Return a reference providing modifiable access to the inserted element.

Return Value

reference providing modifiable access to the inserted element

Parameters

NameDescription
argsarguments forwarded to the value_type constructor