[#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: Converting copy assignment operator. == 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 If `rhs` has a value, assigns it to the stored value. Otherwise resets the stored value in `*this`. If `T&` can be constructed from a temporary, this assignment operator is deleted to prevent binding a temporary to a reference. == Return Value optional& == Template Parameters [cols=2] |=== | Name | Description | *U* | |=== == Parameters [cols=2] |=== | Name | Description | *u* | |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#