[libcxx-commits] [libcxx] [libc++][test] Use `LIBCPP_STATIC_ASSERT` to deal with `noexcept` strengthening (PR #74254)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Dec 6 09:53:49 PST 2023
================
@@ -141,12 +141,12 @@ constexpr void test_mdspan_types(const H& handle, const M& map, const A& acc) {
ASSERT_SAME_TYPE(decltype(m.is_unique()), bool);
ASSERT_SAME_TYPE(decltype(m.is_exhaustive()), bool);
ASSERT_SAME_TYPE(decltype(m.is_strided()), bool);
- assert(!noexcept(MDS::is_always_unique()));
- assert(!noexcept(MDS::is_always_exhaustive()));
- assert(!noexcept(MDS::is_always_strided()));
- assert(!noexcept(m.is_unique()));
- assert(!noexcept(m.is_exhaustive()));
- assert(!noexcept(m.is_strided()));
+ LIBCPP_STATIC_ASSERT(!noexcept(MDS::is_always_unique()));
----------------
philnik777 wrote:
I think I'd like us to file an LWG issue for this, update our implementation and make these `static_assert`s unconditionally with a note that we've implemented a not-yet-accepted LWG issue. For the non-unconditionally noexcept ones we can leave them as `LIBCPP_STATIC_ASSERT`s.
https://github.com/llvm/llvm-project/pull/74254
More information about the libcxx-commits
mailing list