[#BloombergLP-bslstl-Optional_Base-05-emplace-0f] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/Optional_Base-05.adoc[Optional_Base]::emplace :relfileprefix: ../../../ :mrdocs: 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>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class... t_ARGS> t_TYPE& emplace(t_ARGS&&... args); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#