23 General utilities library [utilities]
template <class T> void swap(optional<T>& x, optional<T>& y) noexcept(noexcept(x.swap(y)));
Effects:
Calls
x.swap(y). Remarks: This function shall not participate in overload resolution
unless
is_move_constructible_v<T> is
true and
is_swappable_v<T> is
true. template <class T> constexpr optional<decay_t<T>> make_optional(T&& v);
Returns:
optional<decay_t<T>>(std::forward<T>(v)). template <class T, class...Args>
constexpr optional<T> make_optional(Args&&... args);
Effects: Equivalent to: return optional<T>(in_place, std::forward<Args>(args)...);
template <class T, class U, class... Args>
constexpr optional<T> make_optional(initializer_list<U> il, Args&&... args);
Effects: Equivalent to: return optional<T>(in_place, il, std::forward<Args>(args)...);