std::expected<T,E>::emplace

Constructs an expected value in-place. After the call, has_value() returns true.

# Declarations

Primary template
template< class... Args >
constexpr T& emplace( Args&&... args ) noexcept;

(since C++23)

template< class U, class... Args >
constexpr T& emplace( std::initializer_list<U> il, Args&&... args ) noexcept;

(since C++23)

void partial specialization
constexpr void emplace() noexcept;

(since C++23)

# Parameters

# Notes

If the construction of T is potentially-throwing, operator= can be used instead.

# Example

This section is incompleteReason: no example

# See also