I have a question about this code:
explicit constexpr
optional(in_place_t, initializer_list<_Up> __il, _Args&&... __args)
noexcept(is_nothrow_constructible_v<_Tp, initializer_list<_Up>&,
_Args...>)
: _Base(std::in_place, __il, std::forward<_Args>(__args)...) { }
Why is the reference used here? Initializer list is passed to std::optional
as value. I guess it might be related with the fact that it is a named argument in this context, but I am not sure.