Assign to this Optional_Base object the value of the (template parameter) t_TYPE created in place using the specified args and return a reference providing modifiable access to the underlying t_TYPE object. If this Optional_Base object already contains an object (true == hasValue()), that object is destroyed before the new object is created. The allocator specified at the construction of this Optional_Base object is used to supply memory to the value object. Attempts to explicitly specify via args another allocator to supply memory to the created (value) object are disallowed by the compiler. Note that if the constructor of t_TYPE throws an exception this object is left in a disengaged state.

Synopsis

Declared in <bslstl_optional.h>

template<class... t_ARGS>
t_TYPE&
emplace(t_ARGS&&... args);

Created with MrDocs