member function template
std::optional<T&>::emplace
- Header
<optional>also in<algorithm>,<exception>,<execution>,<flat_map>,<functional>and 8 more- Draft
- [optional.syn]
- Scope
std::optional<T&>- cppreference
- <optional> nearest page
Synopsis
template<class U>
requires is_constructible_v<T&, U> && (!reference_constructs_from_temporary_v<T&, U>)
constexpr T& emplace(U&& u) noexcept(is_nothrow_constructible_v<T &, U>);