]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Fixes compilation error with some versions of libstdc++ 70791/head 70797/head
authorJesse F. Williamson <jfw@ibm.com>
Mon, 3 Aug 2026 14:47:47 +0000 (07:47 -0700)
committerJesse F. Williamson <jfw@ibm.com>
Mon, 3 Aug 2026 15:08:52 +0000 (08:08 -0700)
Some versions of GCC don't expose append_range()/insert_range(), but
when they did, this was b0rked. This patch checks no_range_insertions().

I introduced this compilation error in: 9b3679cc94d853b534cd97d3573e0045d3611dd2
Oops... :-/

Assisted-by: Codex:GPT-5
Signed-off-by: Jesse F. Williamson <jfw@ibm.com>
src/test/test_concepts.cc

index c601fa2406094c348dd30be803c0621697e97829..72aa97a6555d8317f517b624ef4865932b4815c1 100644 (file)
@@ -92,6 +92,10 @@ struct insert_range_only final : vector_backed_range {
   }
 };
 
+struct no_range_insertions final : vector_backed_range {
+  using vector_backed_range::vector_backed_range;
+};
+
 // Only exposes erase(I), to help verify can_remove_front() and pop_front()
 // can work without pop_front() directly being available:
 struct front_erasable final : vector_backed_range {
@@ -532,13 +536,13 @@ TEST_CASE("optional sizing helpers call supported operations only",
   X(insert_after, (ceph::concepts::has_insert_after<int_forward_list, int_forward_list::iterator, int>), \
     (ceph::concepts::has_insert_after<int_vector, int_vector::iterator, int>))  \
   X(append_range, (ceph::concepts::has_append_range<append_range_only, small_array>), \
-    (ceph::concepts::has_append_range<int_vector, small_array>))                \
+    (ceph::concepts::has_append_range<no_range_insertions, small_array>))       \
   X(insert_range_append, (ceph::concepts::has_insert_range_append<insert_range_only, small_array>), \
-    (ceph::concepts::has_insert_range_append<int_vector, small_array>))         \
+    (ceph::concepts::has_insert_range_append<no_range_insertions, small_array>)) \
   X(insert_iterator_range_append, (ceph::concepts::has_insert_iterator_range_append<int_vector, small_array>), \
     (ceph::concepts::has_insert_iterator_range_append<int_forward_list, small_array>)) \
   X(insert_range, (ceph::concepts::has_insert_range<insert_range_only, insert_range_only::iterator, small_array>), \
-    (ceph::concepts::has_insert_range<int_vector, int_vector::iterator, small_array>)) \
+    (ceph::concepts::has_insert_range<no_range_insertions, no_range_insertions::iterator, small_array>)) \
   X(insert_iterator_range, (ceph::concepts::has_insert_iterator_range<int_vector, int_vector::iterator, small_array>), \
     (ceph::concepts::has_insert_iterator_range<int_forward_list, int_forward_list::iterator, small_array>)) \
   X(emplace_front, (ceph::concepts::has_emplace_front<int_deque, int>),         \