Stephan T. Lavavej 84742cd867
[libc++][test] Mark optional test functions as TEST_CONSTEXPR_CXX20 (#94172)
[P2231R1](https://wg21.link/P2231R1) "Missing `constexpr` in
`std::optional` and `std::variant`" was accepted as a C++20 Defect
Report, not a C++17 Defect Report. Accordingly, `test_empty_emplace()`
and `check_reset()` should be marked as `TEST_CONSTEXPR_CXX20`. Note
that their `static_assert`s are properly guarded:


4ce65423be/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp (L270-L272)


4ce65423be/libcxx/test/std/utilities/optional/optional.object/optional.object.mod/reset.pass.cpp (L53-L55)

Found while running libc++'s tests with MSVC's STL, as we activate our
`constexpr` here for C++20 and above.
2024-06-03 10:08:46 +02:00
..