Destroy any contained value and construct a new one in place.
Declared in <bslstl_optional.h>
template<class... t_ARGS>
t_TYPE&
emplace(
bslma::Allocator* allocator,
t_ARGS&&... args);
Create an object of StoredType in d_buffer using the specified allocator and args and return a reference providing modifiable access to the underlying t_TYPE object.
reference providing modifiable access to the contained value
| Name | Description |
|---|---|
| allocator | allocator used to supply memory |
| args | arguments forwarded to construct the contained value |