Skip to content

Commit b84cb9c

Browse files
[libc++][test] Use LIBCPP_STATIC_ASSERT for std::__mdspan_detail (llvm#73436)
Found while running libc++'s test suite against MSVC's STL. `libcxx/test/std` should be portable, so these lines checking `std::__mdspan_detail` machinery should be using `LIBCPP_STATIC_ASSERT`. I checked for other occurrences and these appear to be the only ones which have appeared since our last libc++ test suite update.
1 parent f5832ba commit b84cb9c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

libcxx/test/std/containers/views/mdspan/layout_left/static_requirements.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
template <class M, size_t... Idxs>
8888
void test_mapping_requirements(std::index_sequence<Idxs...>) {
8989
using E = typename M::extents_type;
90-
static_assert(std::__mdspan_detail::__is_extents_v<E>);
90+
LIBCPP_STATIC_ASSERT(std::__mdspan_detail::__is_extents_v<E>);
9191
static_assert(std::is_copy_constructible_v<M>);
9292
static_assert(std::is_nothrow_move_constructible_v<M>);
9393
static_assert(std::is_nothrow_move_assignable_v<M>);

libcxx/test/std/containers/views/mdspan/layout_right/static_requirements.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
template <class M, size_t... Idxs>
8888
void test_mapping_requirements(std::index_sequence<Idxs...>) {
8989
using E = typename M::extents_type;
90-
static_assert(std::__mdspan_detail::__is_extents_v<E>);
90+
LIBCPP_STATIC_ASSERT(std::__mdspan_detail::__is_extents_v<E>);
9191
static_assert(std::is_copy_constructible_v<M>);
9292
static_assert(std::is_nothrow_move_constructible_v<M>);
9393
static_assert(std::is_nothrow_move_assignable_v<M>);

libcxx/test/std/containers/views/mdspan/layout_stride/static_requirements.pass.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
template <class M, size_t... Idxs>
8888
void test_mapping_requirements(std::index_sequence<Idxs...>) {
8989
using E = typename M::extents_type;
90-
static_assert(std::__mdspan_detail::__is_extents_v<E>);
90+
LIBCPP_STATIC_ASSERT(std::__mdspan_detail::__is_extents_v<E>);
9191
static_assert(std::is_copy_constructible_v<M>);
9292
static_assert(std::is_nothrow_move_constructible_v<M>);
9393
static_assert(std::is_nothrow_move_assignable_v<M>);

0 commit comments

Comments
 (0)