[all-commits] [llvm/llvm-project] 84742c: [libc++][test] Mark `optional` test functions as `...

Stephan T. Lavavej via All-commits all-commits at lists.llvm.org
Mon Jun 3 01:09:07 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 84742cd867b0e7e76da6bdc08cc7c56beac86168
      https://github.com/llvm/llvm-project/commit/84742cd867b0e7e76da6bdc08cc7c56beac86168
  Author: Stephan T. Lavavej <stl at nuwen.net>
  Date:   2024-06-03 (Mon, 03 Jun 2024)

  Changed paths:
    M libcxx/test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp
    M libcxx/test/std/utilities/optional/optional.object/optional.object.mod/reset.pass.cpp

  Log Message:
  -----------
  [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:


https://github.com/llvm/llvm-project/blob/4ce65423be0ba1d90c11b6a79981d6314e1cf36d/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/emplace.pass.cpp#L270-L272


https://github.com/llvm/llvm-project/blob/4ce65423be0ba1d90c11b6a79981d6314e1cf36d/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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list