[libcxx-commits] [libcxx] f105d98 - [libcxx][test] `unordered_meow` iterators are not portably non-bidi
Casey Carter via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jan 18 11:43:28 PST 2022
Author: Casey Carter
Date: 2022-01-18T11:43:21-08:00
New Revision: f105d984431955d794f3c8452d534a8c58bdb6a5
URL: https://github.com/llvm/llvm-project/commit/f105d984431955d794f3c8452d534a8c58bdb6a5
DIFF: https://github.com/llvm/llvm-project/commit/f105d984431955d794f3c8452d534a8c58bdb6a5.diff
LOG: [libcxx][test] `unordered_meow` iterators are not portably non-bidi
MSVCSTL's are actually bidirectional.
Differential Revision: https://reviews.llvm.org/D117369
Added:
Modified:
libcxx/test/std/containers/unord/unord.map/iterator_concept_conformance.compile.pass.cpp
libcxx/test/std/containers/unord/unord.map/range_concept_conformance.compile.pass.cpp
libcxx/test/std/containers/unord/unord.multimap/iterator_concept_conformance.compile.pass.cpp
libcxx/test/std/containers/unord/unord.multimap/range_concept_conformance.compile.pass.cpp
libcxx/test/std/containers/unord/unord.multiset/iterator_concept_conformance.compile.pass.cpp
libcxx/test/std/containers/unord/unord.multiset/range_concept_conformance.compile.pass.cpp
libcxx/test/std/containers/unord/unord.set/iterator_concept_conformance.compile.pass.cpp
libcxx/test/std/containers/unord/unord.set/range_concept_conformance.compile.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/test/std/containers/unord/unord.map/iterator_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/unord/unord.map/iterator_concept_conformance.compile.pass.cpp
index 02d9b62c8103c..e3e5d00bb4789 100644
--- a/libcxx/test/std/containers/unord/unord.map/iterator_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/iterator_concept_conformance.compile.pass.cpp
@@ -15,6 +15,8 @@
#include <iterator>
+#include "test_macros.h"
+
using iterator = std::unordered_map<int, int>::iterator;
using const_iterator = std::unordered_map<int, int>::const_iterator;
using local_iterator = std::unordered_map<int, int>::local_iterator;
@@ -22,42 +24,32 @@ using const_local_iterator = std::unordered_map<int, int>::const_local_iterator;
using value_type = std::pair<const int, int>;
static_assert(std::forward_iterator<iterator>);
-static_assert(!std::bidirectional_iterator<iterator>);
+LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<iterator>);
static_assert(!std::indirectly_writable<iterator, value_type>);
static_assert(std::sentinel_for<iterator, iterator>);
static_assert(std::sentinel_for<iterator, const_iterator>);
-static_assert(!std::sentinel_for<iterator, local_iterator>);
-static_assert(!std::sentinel_for<iterator, const_local_iterator>);
static_assert(!std::sized_sentinel_for<iterator, iterator>);
static_assert(!std::sized_sentinel_for<iterator, const_iterator>);
-static_assert(!std::sized_sentinel_for<iterator, local_iterator>);
-static_assert(!std::sized_sentinel_for<iterator, const_local_iterator>);
static_assert(std::indirectly_movable<iterator, std::pair<int, int>*>);
static_assert(!std::indirectly_movable_storable<iterator, std::pair<int, int>*>);
static_assert(!std::indirectly_swappable<iterator, iterator>);
static_assert(std::forward_iterator<const_iterator>);
-static_assert(!std::bidirectional_iterator<const_iterator>);
+LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<const_iterator>);
static_assert(!std::indirectly_writable<const_iterator, value_type>);
static_assert(std::sentinel_for<const_iterator, iterator>);
static_assert(std::sentinel_for<const_iterator, const_iterator>);
-static_assert(!std::sentinel_for<const_iterator, local_iterator>);
-static_assert(!std::sentinel_for<const_iterator, const_local_iterator>);
static_assert(!std::sized_sentinel_for<const_iterator, iterator>);
static_assert(!std::sized_sentinel_for<const_iterator, const_iterator>);
-static_assert(!std::sized_sentinel_for<const_iterator, local_iterator>);
-static_assert(!std::sized_sentinel_for<const_iterator, const_local_iterator>);
+static_assert(std::indirectly_movable<const_iterator, std::pair<int, int>*>);
+static_assert(!std::indirectly_movable_storable<const_iterator, std::pair<int, int>*>);
static_assert(!std::indirectly_swappable<const_iterator, const_iterator>);
static_assert(std::forward_iterator<local_iterator>);
-static_assert(!std::bidirectional_iterator<local_iterator>);
+LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<local_iterator>);
static_assert(!std::indirectly_writable<local_iterator, value_type>);
-static_assert(!std::sentinel_for<local_iterator, iterator>);
-static_assert(!std::sentinel_for<local_iterator, const_iterator>);
static_assert(std::sentinel_for<local_iterator, local_iterator>);
static_assert(std::sentinel_for<local_iterator, const_local_iterator>);
-static_assert(!std::sized_sentinel_for<local_iterator, iterator>);
-static_assert(!std::sized_sentinel_for<local_iterator, const_iterator>);
static_assert(!std::sized_sentinel_for<local_iterator, local_iterator>);
static_assert(!std::sized_sentinel_for<local_iterator, const_local_iterator>);
static_assert(std::indirectly_movable<local_iterator, std::pair<int, int>*>);
@@ -65,14 +57,12 @@ static_assert(!std::indirectly_movable_storable<local_iterator, std::pair<int, i
static_assert(!std::indirectly_swappable<local_iterator, local_iterator>);
static_assert(std::forward_iterator<const_local_iterator>);
-static_assert(!std::bidirectional_iterator<const_local_iterator>);
+LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<const_local_iterator>);
static_assert(!std::indirectly_writable<const_local_iterator, value_type>);
-static_assert(!std::sentinel_for<const_local_iterator, iterator>);
-static_assert(!std::sentinel_for<const_local_iterator, const_iterator>);
static_assert(std::sentinel_for<const_local_iterator, local_iterator>);
static_assert(std::sentinel_for<const_local_iterator, const_local_iterator>);
-static_assert(!std::sized_sentinel_for<const_local_iterator, iterator>);
-static_assert(!std::sized_sentinel_for<const_local_iterator, const_iterator>);
static_assert(!std::sized_sentinel_for<const_local_iterator, local_iterator>);
static_assert(!std::sized_sentinel_for<const_local_iterator, const_local_iterator>);
+static_assert(std::indirectly_movable<const_local_iterator, std::pair<int, int>*>);
+static_assert(!std::indirectly_movable_storable<const_local_iterator, std::pair<int, int>*>);
static_assert(!std::indirectly_swappable<const_local_iterator, const_local_iterator>);
diff --git a/libcxx/test/std/containers/unord/unord.map/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/unord/unord.map/range_concept_conformance.compile.pass.cpp
index 897e709699f76..fbdff43d23432 100644
--- a/libcxx/test/std/containers/unord/unord.map/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/range_concept_conformance.compile.pass.cpp
@@ -17,13 +17,15 @@
#include <concepts>
#include <ranges>
+#include "test_macros.h"
+
using range = std::unordered_map<int, int>;
static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
static_assert(std::ranges::common_range<range>);
static_assert(std::ranges::forward_range<range>);
-static_assert(!std::ranges::bidirectional_range<range>);
+LIBCPP_STATIC_ASSERT(!std::ranges::bidirectional_range<range>);
static_assert(!std::ranges::view<range>);
static_assert(std::ranges::sized_range<range>);
static_assert(!std::ranges::borrowed_range<range>);
@@ -32,7 +34,7 @@ static_assert(std::ranges::viewable_range<range>);
static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
static_assert(std::ranges::common_range<range const>);
static_assert(std::ranges::forward_range<range const>);
-static_assert(!std::ranges::bidirectional_range<range const>);
+LIBCPP_STATIC_ASSERT(!std::ranges::bidirectional_range<range const>);
static_assert(!std::ranges::view<range const>);
static_assert(std::ranges::sized_range<range const>);
static_assert(!std::ranges::borrowed_range<range const>);
diff --git a/libcxx/test/std/containers/unord/unord.multimap/iterator_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/iterator_concept_conformance.compile.pass.cpp
index f7317da10d9ca..8fe699bbfbc48 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/iterator_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/iterator_concept_conformance.compile.pass.cpp
@@ -15,6 +15,8 @@
#include <iterator>
+#include "test_macros.h"
+
using iterator = std::unordered_multimap<int, int>::iterator;
using const_iterator = std::unordered_multimap<int, int>::const_iterator;
using local_iterator = std::unordered_multimap<int, int>::local_iterator;
@@ -22,42 +24,32 @@ using const_local_iterator = std::unordered_multimap<int, int>::const_local_iter
using value_type = std::pair<const int, int>;
static_assert(std::forward_iterator<iterator>);
-static_assert(!std::bidirectional_iterator<iterator>);
+LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<iterator>);
static_assert(!std::indirectly_writable<iterator, value_type>);
static_assert(std::sentinel_for<iterator, iterator>);
static_assert(std::sentinel_for<iterator, const_iterator>);
-static_assert(!std::sentinel_for<iterator, local_iterator>);
-static_assert(!std::sentinel_for<iterator, const_local_iterator>);
static_assert(!std::sized_sentinel_for<iterator, iterator>);
static_assert(!std::sized_sentinel_for<iterator, const_iterator>);
-static_assert(!std::sized_sentinel_for<iterator, local_iterator>);
-static_assert(!std::sized_sentinel_for<iterator, const_local_iterator>);
static_assert(std::indirectly_movable<iterator, std::pair<int, int>*>);
static_assert(!std::indirectly_movable_storable<iterator, std::pair<int, int>*>);
static_assert(!std::indirectly_swappable<iterator, iterator>);
static_assert(std::forward_iterator<const_iterator>);
-static_assert(!std::bidirectional_iterator<const_iterator>);
+LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<const_iterator>);
static_assert(!std::indirectly_writable<const_iterator, value_type>);
static_assert(std::sentinel_for<const_iterator, iterator>);
static_assert(std::sentinel_for<const_iterator, const_iterator>);
-static_assert(!std::sentinel_for<const_iterator, local_iterator>);
-static_assert(!std::sentinel_for<const_iterator, const_local_iterator>);
static_assert(!std::sized_sentinel_for<const_iterator, iterator>);
static_assert(!std::sized_sentinel_for<const_iterator, const_iterator>);
-static_assert(!std::sized_sentinel_for<const_iterator, local_iterator>);
-static_assert(!std::sized_sentinel_for<const_iterator, const_local_iterator>);
+static_assert(std::indirectly_movable<const_iterator, std::pair<int, int>*>);
+static_assert(!std::indirectly_movable_storable<const_iterator, std::pair<int, int>*>);
static_assert(!std::indirectly_swappable<const_iterator, const_iterator>);
static_assert(std::forward_iterator<local_iterator>);
-static_assert(!std::bidirectional_iterator<local_iterator>);
+LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<local_iterator>);
static_assert(!std::indirectly_writable<local_iterator, value_type>);
-static_assert(!std::sentinel_for<local_iterator, iterator>);
-static_assert(!std::sentinel_for<local_iterator, const_iterator>);
static_assert(std::sentinel_for<local_iterator, local_iterator>);
static_assert(std::sentinel_for<local_iterator, const_local_iterator>);
-static_assert(!std::sized_sentinel_for<local_iterator, iterator>);
-static_assert(!std::sized_sentinel_for<local_iterator, const_iterator>);
static_assert(!std::sized_sentinel_for<local_iterator, local_iterator>);
static_assert(!std::sized_sentinel_for<local_iterator, const_local_iterator>);
static_assert(std::indirectly_movable<local_iterator, std::pair<int, int>*>);
@@ -65,14 +57,12 @@ static_assert(!std::indirectly_movable_storable<local_iterator, std::pair<int, i
static_assert(!std::indirectly_swappable<local_iterator, local_iterator>);
static_assert(std::forward_iterator<const_local_iterator>);
-static_assert(!std::bidirectional_iterator<const_local_iterator>);
+LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<const_local_iterator>);
static_assert(!std::indirectly_writable<const_local_iterator, value_type>);
-static_assert(!std::sentinel_for<const_local_iterator, iterator>);
-static_assert(!std::sentinel_for<const_local_iterator, const_iterator>);
static_assert(std::sentinel_for<const_local_iterator, local_iterator>);
static_assert(std::sentinel_for<const_local_iterator, const_local_iterator>);
-static_assert(!std::sized_sentinel_for<const_local_iterator, iterator>);
-static_assert(!std::sized_sentinel_for<const_local_iterator, const_iterator>);
static_assert(!std::sized_sentinel_for<const_local_iterator, local_iterator>);
static_assert(!std::sized_sentinel_for<const_local_iterator, const_local_iterator>);
+static_assert(std::indirectly_movable<const_local_iterator, std::pair<int, int>*>);
+static_assert(!std::indirectly_movable_storable<const_local_iterator, std::pair<int, int>*>);
static_assert(!std::indirectly_swappable<const_local_iterator, const_local_iterator>);
diff --git a/libcxx/test/std/containers/unord/unord.multimap/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/range_concept_conformance.compile.pass.cpp
index 27c5b7fd968b8..6db3ac1ef1602 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/range_concept_conformance.compile.pass.cpp
@@ -17,13 +17,15 @@
#include <concepts>
#include <ranges>
+#include "test_macros.h"
+
using range = std::unordered_multimap<int, int>;
static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
static_assert(std::ranges::common_range<range>);
static_assert(std::ranges::forward_range<range>);
-static_assert(!std::ranges::bidirectional_range<range>);
+LIBCPP_STATIC_ASSERT(!std::ranges::bidirectional_range<range>);
static_assert(!std::ranges::view<range>);
static_assert(std::ranges::sized_range<range>);
static_assert(!std::ranges::borrowed_range<range>);
@@ -32,7 +34,7 @@ static_assert(std::ranges::viewable_range<range>);
static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
static_assert(std::ranges::common_range<range const>);
static_assert(std::ranges::forward_range<range const>);
-static_assert(!std::ranges::bidirectional_range<range const>);
+LIBCPP_STATIC_ASSERT(!std::ranges::bidirectional_range<range const>);
static_assert(!std::ranges::view<range const>);
static_assert(std::ranges::sized_range<range const>);
static_assert(!std::ranges::borrowed_range<range const>);
diff --git a/libcxx/test/std/containers/unord/unord.multiset/iterator_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/iterator_concept_conformance.compile.pass.cpp
index 517ab45c0c917..9c5612cafb0dd 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/iterator_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/iterator_concept_conformance.compile.pass.cpp
@@ -15,6 +15,8 @@
#include <iterator>
+#include "test_macros.h"
+
using iterator = std::unordered_multiset<int>::iterator;
using const_iterator = std::unordered_multiset<int>::const_iterator;
using local_iterator = std::unordered_multiset<int>::local_iterator;
@@ -22,42 +24,32 @@ using const_local_iterator = std::unordered_multiset<int>::const_local_iterator;
using value_type = int;
static_assert(std::forward_iterator<iterator>);
-static_assert(!std::bidirectional_iterator<iterator>);
+LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<iterator>);
static_assert(!std::indirectly_writable<iterator, value_type>);
static_assert(std::sentinel_for<iterator, iterator>);
static_assert(std::sentinel_for<iterator, const_iterator>);
-static_assert(!std::sentinel_for<iterator, local_iterator>);
-static_assert(!std::sentinel_for<iterator, const_local_iterator>);
static_assert(!std::sized_sentinel_for<iterator, iterator>);
static_assert(!std::sized_sentinel_for<iterator, const_iterator>);
-static_assert(!std::sized_sentinel_for<iterator, local_iterator>);
-static_assert(!std::sized_sentinel_for<iterator, const_local_iterator>);
static_assert(std::indirectly_movable<iterator, int*>);
static_assert(std::indirectly_movable_storable<iterator, int*>);
static_assert(!std::indirectly_swappable<iterator, iterator>);
static_assert(std::forward_iterator<const_iterator>);
-static_assert(!std::bidirectional_iterator<const_iterator>);
+LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<const_iterator>);
static_assert(!std::indirectly_writable<const_iterator, value_type>);
static_assert(std::sentinel_for<const_iterator, iterator>);
static_assert(std::sentinel_for<const_iterator, const_iterator>);
-static_assert(!std::sentinel_for<const_iterator, local_iterator>);
-static_assert(!std::sentinel_for<const_iterator, const_local_iterator>);
static_assert(!std::sized_sentinel_for<const_iterator, iterator>);
static_assert(!std::sized_sentinel_for<const_iterator, const_iterator>);
-static_assert(!std::sized_sentinel_for<const_iterator, local_iterator>);
-static_assert(!std::sized_sentinel_for<const_iterator, const_local_iterator>);
+static_assert(std::indirectly_movable<const_iterator, int*>);
+static_assert(std::indirectly_movable_storable<const_iterator, int*>);
static_assert(!std::indirectly_swappable<const_iterator, const_iterator>);
static_assert(std::forward_iterator<local_iterator>);
-static_assert(!std::bidirectional_iterator<local_iterator>);
+LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<local_iterator>);
static_assert(!std::indirectly_writable<local_iterator, value_type>);
-static_assert(!std::sentinel_for<local_iterator, iterator>);
-static_assert(!std::sentinel_for<local_iterator, const_iterator>);
static_assert(std::sentinel_for<local_iterator, local_iterator>);
static_assert(std::sentinel_for<local_iterator, const_local_iterator>);
-static_assert(!std::sized_sentinel_for<local_iterator, iterator>);
-static_assert(!std::sized_sentinel_for<local_iterator, const_iterator>);
static_assert(!std::sized_sentinel_for<local_iterator, local_iterator>);
static_assert(!std::sized_sentinel_for<local_iterator, const_local_iterator>);
static_assert(std::indirectly_movable<local_iterator, int*>);
@@ -65,14 +57,12 @@ static_assert(std::indirectly_movable_storable<local_iterator, int*>);
static_assert(!std::indirectly_swappable<local_iterator, local_iterator>);
static_assert(std::forward_iterator<const_local_iterator>);
-static_assert(!std::bidirectional_iterator<const_local_iterator>);
+LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<const_local_iterator>);
static_assert(!std::indirectly_writable<const_local_iterator, value_type>);
-static_assert(!std::sentinel_for<const_local_iterator, iterator>);
-static_assert(!std::sentinel_for<const_local_iterator, const_iterator>);
static_assert(std::sentinel_for<const_local_iterator, local_iterator>);
static_assert(std::sentinel_for<const_local_iterator, const_local_iterator>);
-static_assert(!std::sized_sentinel_for<const_local_iterator, iterator>);
-static_assert(!std::sized_sentinel_for<const_local_iterator, const_iterator>);
static_assert(!std::sized_sentinel_for<const_local_iterator, local_iterator>);
static_assert(!std::sized_sentinel_for<const_local_iterator, const_local_iterator>);
+static_assert(std::indirectly_movable<const_local_iterator, int*>);
+static_assert(std::indirectly_movable_storable<const_local_iterator, int*>);
static_assert(!std::indirectly_swappable<const_local_iterator, const_local_iterator>);
diff --git a/libcxx/test/std/containers/unord/unord.multiset/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/range_concept_conformance.compile.pass.cpp
index b1f98ae1bed3f..0120af2f77729 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/range_concept_conformance.compile.pass.cpp
@@ -17,13 +17,15 @@
#include <concepts>
#include <ranges>
+#include "test_macros.h"
+
using range = std::unordered_multiset<int>;
static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
static_assert(std::ranges::common_range<range>);
static_assert(std::ranges::forward_range<range>);
-static_assert(!std::ranges::bidirectional_range<range>);
+LIBCPP_STATIC_ASSERT(!std::ranges::bidirectional_range<range>);
static_assert(!std::ranges::view<range>);
static_assert(std::ranges::sized_range<range>);
static_assert(!std::ranges::borrowed_range<range>);
@@ -32,7 +34,7 @@ static_assert(std::ranges::viewable_range<range>);
static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
static_assert(std::ranges::common_range<range const>);
static_assert(std::ranges::forward_range<range const>);
-static_assert(!std::ranges::bidirectional_range<range const>);
+LIBCPP_STATIC_ASSERT(!std::ranges::bidirectional_range<range const>);
static_assert(!std::ranges::view<range const>);
static_assert(std::ranges::sized_range<range const>);
static_assert(!std::ranges::borrowed_range<range const>);
diff --git a/libcxx/test/std/containers/unord/unord.set/iterator_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/unord/unord.set/iterator_concept_conformance.compile.pass.cpp
index 1eb8d50f5b093..da7725768ea11 100644
--- a/libcxx/test/std/containers/unord/unord.set/iterator_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/iterator_concept_conformance.compile.pass.cpp
@@ -15,6 +15,8 @@
#include <iterator>
+#include "test_macros.h"
+
using iterator = std::unordered_set<int>::iterator;
using const_iterator = std::unordered_set<int>::const_iterator;
using local_iterator = std::unordered_set<int>::local_iterator;
@@ -22,41 +24,31 @@ using const_local_iterator = std::unordered_set<int>::const_local_iterator;
using value_type = int;
static_assert(std::forward_iterator<iterator>);
-static_assert(!std::bidirectional_iterator<iterator>);
+LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<iterator>);
static_assert(!std::indirectly_writable<iterator, value_type>);
static_assert(std::sentinel_for<iterator, iterator>);
static_assert(std::sentinel_for<iterator, const_iterator>);
-static_assert(!std::sentinel_for<iterator, local_iterator>);
-static_assert(!std::sentinel_for<iterator, const_local_iterator>);
static_assert(!std::sized_sentinel_for<iterator, iterator>);
static_assert(!std::sized_sentinel_for<iterator, const_iterator>);
-static_assert(!std::sized_sentinel_for<iterator, local_iterator>);
-static_assert(!std::sized_sentinel_for<iterator, const_local_iterator>);
static_assert(std::indirectly_movable<iterator, int*>);
static_assert(std::indirectly_movable_storable<iterator, int*>);
static_assert(!std::indirectly_swappable<iterator, iterator>);
static_assert(std::forward_iterator<const_iterator>);
-static_assert(!std::bidirectional_iterator<const_iterator>);
+LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<const_iterator>);
static_assert(!std::indirectly_writable<const_iterator, value_type>);
static_assert(std::sentinel_for<const_iterator, iterator>);
static_assert(std::sentinel_for<const_iterator, const_iterator>);
-static_assert(!std::sentinel_for<const_iterator, local_iterator>);
-static_assert(!std::sentinel_for<const_iterator, const_local_iterator>);
static_assert(!std::sized_sentinel_for<const_iterator, iterator>);
static_assert(!std::sized_sentinel_for<const_iterator, const_iterator>);
-static_assert(!std::sized_sentinel_for<const_iterator, local_iterator>);
-static_assert(!std::sized_sentinel_for<const_iterator, const_local_iterator>);
+static_assert(std::indirectly_movable<const_iterator, int*>);
+static_assert(std::indirectly_movable_storable<const_iterator, int*>);
static_assert(!std::indirectly_swappable<const_iterator, const_iterator>);
static_assert(std::forward_iterator<local_iterator>);
-static_assert(!std::bidirectional_iterator<local_iterator>);
-static_assert(!std::sentinel_for<local_iterator, iterator>);
-static_assert(!std::sentinel_for<local_iterator, const_iterator>);
+LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<local_iterator>);
static_assert(std::sentinel_for<local_iterator, local_iterator>);
static_assert(std::sentinel_for<local_iterator, const_local_iterator>);
-static_assert(!std::sized_sentinel_for<local_iterator, iterator>);
-static_assert(!std::sized_sentinel_for<local_iterator, const_iterator>);
static_assert(!std::sized_sentinel_for<local_iterator, local_iterator>);
static_assert(!std::sized_sentinel_for<local_iterator, const_local_iterator>);
static_assert(std::indirectly_movable<local_iterator, int*>);
@@ -64,14 +56,12 @@ static_assert(std::indirectly_movable_storable<local_iterator, int*>);
static_assert(!std::indirectly_swappable<local_iterator, local_iterator>);
static_assert(std::forward_iterator<const_local_iterator>);
-static_assert(!std::bidirectional_iterator<const_local_iterator>);
+LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<const_local_iterator>);
static_assert(!std::indirectly_writable<const_local_iterator, value_type>);
-static_assert(!std::sentinel_for<const_local_iterator, iterator>);
-static_assert(!std::sentinel_for<const_local_iterator, const_iterator>);
static_assert(std::sentinel_for<const_local_iterator, local_iterator>);
static_assert(std::sentinel_for<const_local_iterator, const_local_iterator>);
-static_assert(!std::sized_sentinel_for<const_local_iterator, iterator>);
-static_assert(!std::sized_sentinel_for<const_local_iterator, const_iterator>);
static_assert(!std::sized_sentinel_for<const_local_iterator, local_iterator>);
static_assert(!std::sized_sentinel_for<const_local_iterator, const_local_iterator>);
+static_assert(std::indirectly_movable<const_local_iterator, int*>);
+static_assert(std::indirectly_movable_storable<const_local_iterator, int*>);
static_assert(!std::indirectly_swappable<const_local_iterator, const_local_iterator>);
diff --git a/libcxx/test/std/containers/unord/unord.set/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/unord/unord.set/range_concept_conformance.compile.pass.cpp
index 0303de9e39c42..29d489f5267fe 100644
--- a/libcxx/test/std/containers/unord/unord.set/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/range_concept_conformance.compile.pass.cpp
@@ -17,13 +17,15 @@
#include <concepts>
#include <ranges>
+#include "test_macros.h"
+
using range = std::unordered_set<int>;
static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
static_assert(std::ranges::common_range<range>);
static_assert(std::ranges::forward_range<range>);
-static_assert(!std::ranges::bidirectional_range<range>);
+LIBCPP_STATIC_ASSERT(!std::ranges::bidirectional_range<range>);
static_assert(!std::ranges::view<range>);
static_assert(std::ranges::sized_range<range>);
static_assert(!std::ranges::borrowed_range<range>);
@@ -32,7 +34,7 @@ static_assert(std::ranges::viewable_range<range>);
static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
static_assert(std::ranges::common_range<range const>);
static_assert(std::ranges::forward_range<range const>);
-static_assert(!std::ranges::bidirectional_range<range const>);
+LIBCPP_STATIC_ASSERT(!std::ranges::bidirectional_range<range const>);
static_assert(!std::ranges::view<range const>);
static_assert(std::ranges::sized_range<range const>);
static_assert(!std::ranges::borrowed_range<range const>);
More information about the libcxx-commits
mailing list