[#beman-optional-optional-06-emplace] = xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::xref:beman/optional/optional-06.adoc[optional<T&>]::emplace :relfileprefix: ../../../ :mrdocs: Emplaces a new value in the optional, destroying the current one if == Synopsis Declared in `<beman/optional/optional.hpp>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class U> requires (std::is_constructible_v<T&, U> && !detail::reference_constructs_from_temporary_v<T&, U>) constexpr T& emplace(U&& u) noexcept(std::is_nothrow_constructible_v<T &, U>); ---- == Description Constructs the stored value from `u` if it is convertible to `T&`. == Return Value T& [.small]#Created with https://www.mrdocs.com[MrDocs]#