Makes the following operations constexpr: * `std::swap(optional, optional)` * `optional(optional<U> const&)` * `optional(optional<U>&&)` * `~optional()` * `operator=(nullopt_t)` * `operator=(U&&)` * `operator=(optional<U> const&)` * `operator=(optional<U>&&)` * `emplace(Args&&...)` * `emplace(initializer_list<U>, Args&&...)` * `swap(optional&)` * `reset()` P2231 has been accepted by plenary, with the committee recommending implementers retroactively apply to C++20. It's necessary for us to implement _`semiregular-box`_ and _`non-propagating-cache`_, both of which are required for ranges (otherwise we'll need to reimplement `std::optional` with these members `constexpr`ified). Differential Revision: https://reviews.llvm.org/D102119 |
||
|---|---|---|
| .. | ||
| U.pass.cpp | ||
| const_T.pass.cpp | ||
| const_optional_U.pass.cpp | ||
| copy.pass.cpp | ||
| ctor.fail.cpp | ||
| deduct.fail.cpp | ||
| deduct.pass.cpp | ||
| default.pass.cpp | ||
| empty_in_place_t_does_not_clobber.pass.cpp | ||
| explicit_const_optional_U.pass.cpp | ||
| explicit_optional_U.pass.cpp | ||
| in_place_t.pass.cpp | ||
| initializer_list.pass.cpp | ||
| move.fail.cpp | ||
| move.pass.cpp | ||
| nullopt_t.pass.cpp | ||
| optional_U.pass.cpp | ||
| rvalue_T.pass.cpp | ||