]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Define __cpp_lib_containers_ranges in appropriate headers [PR111055]
authorTomasz Kamiński <tkaminsk@redhat.com>
Fri, 21 Mar 2025 11:55:48 +0000 (12:55 +0100)
committerTomasz Kamiński <tkaminsk@redhat.com>
Fri, 11 Apr 2025 11:56:03 +0000 (13:56 +0200)
This is final piece of P1206R7, adding a feature test macros,
as range constructors and member operations are now implemented for
all containers and adaptors.

For consistency with the proposal, all new container operations and
helpers are now defined if __glibcxx_containers_ranges, instead
of __glibcxx_ranges_to_container.

PR libstdc++/111055

libstdc++-v3/ChangeLog:

* include/bits/version.def (containers_ranges): Define.
* include/bits/version.h: Regenerate.
* include/bits/ranges_base.h (__detail::__container_compatible_range)
(__detail::__range_to_alloc_type, __detail::__range_mapped_type)
(__detail::__range_key_type): Depend on __glibcxx_containers_ranges
instead of __glibcxx_ranges_to_container.
* include/bits/basic_string.h: Replace __glibcxx_ranges_to_container with
__glibcxx_containers_ranges.
* include/bits/cow_string.h: Likewise.
* include/bits/deque.tcc: Likewise.
* include/bits/forward_list.h: Likewise.
* include/bits/stl_bvector.h: Likewise.
* include/bits/stl_deque.h: Likewise.
* include/bits/stl_list.h: Likewise.
* include/bits/stl_map.h: Likewise.
* include/bits/stl_multimap.h: Likewise.
* include/bits/stl_multiset.h: Likewise.
* include/bits/stl_queue.h: Likewise.
* include/bits/stl_set.h: Likewise.
* include/bits/stl_stack.h: Likewise.
* include/bits/stl_vector.h: Likewise.
* include/bits/unordered_map.h: Likewise.
* include/bits/unordered_set.h: Likewise.
* include/bits/vector.tcc: Likewise.
* include/debug/deque: Likewise.
* include/debug/forward_list: Likewise.
* include/debug/list: Likewise.
* include/debug/map.h: Likewise.
* include/debug/multimap.h: Likewise.
* include/debug/multiset.h: Likewise.
* include/debug/set.h: Likewise.
* include/debug/unordered_map: Likewise.
* include/debug/unordered_set: Likewise.
* include/debug/vector: Likewise.
* include/std/deque: Provide __cpp_lib_containers_ranges.
* include/std/forward_list: Likewise.
* include/std/list: Likewise.
* include/std/map: Likewise.
* include/std/queue: Likewise.
* include/std/set: Likewise.
* include/std/stack: Likewise.
* include/std/string: Likewise.
* include/std/unordered_map: Likewise.
* include/std/unordered_set: Likewise.
* include/std/vector: Likewise.
* testsuite/21_strings/basic_string/cons/from_range.cc: Test for value
__cpp_lib_containers_ranges.
* testsuite/23_containers/deque/cons/from_range.cc: Likewise.
* testsuite/23_containers/forward_list/cons/from_range.cc: Likewise.
* testsuite/23_containers/list/cons/from_range.cc: Likewise.
* testsuite/23_containers/map/cons/from_range.cc: Likewise.
* testsuite/23_containers/multimap/cons/from_range.cc: Likewise.
* testsuite/23_containers/multiset/cons/from_range.cc: Likewise.
* testsuite/23_containers/priority_queue/cons_from_range.cc: Likewise.
* testsuite/23_containers/queue/cons_from_range.cc: Likewise.
* testsuite/23_containers/set/cons/from_range.cc: Likewise.
* testsuite/23_containers/stack/cons_from_range.cc: Likewise.
* testsuite/23_containers/unordered_map/cons/from_range.cc: Likewise.
* testsuite/23_containers/unordered_multimap/cons/from_range.cc: Likewise.
* testsuite/23_containers/unordered_multiset/cons/from_range.cc: Likewise.
* testsuite/23_containers/unordered_set/cons/from_range.cc: Likewise.
* testsuite/23_containers/vector/bool/cons/from_range.cc: Likewise.
* testsuite/23_containers/vector/cons/from_range.cc: Likewise.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
58 files changed:
libstdc++-v3/include/bits/basic_string.h
libstdc++-v3/include/bits/cow_string.h
libstdc++-v3/include/bits/deque.tcc
libstdc++-v3/include/bits/forward_list.h
libstdc++-v3/include/bits/ranges_base.h
libstdc++-v3/include/bits/stl_bvector.h
libstdc++-v3/include/bits/stl_deque.h
libstdc++-v3/include/bits/stl_list.h
libstdc++-v3/include/bits/stl_map.h
libstdc++-v3/include/bits/stl_multimap.h
libstdc++-v3/include/bits/stl_multiset.h
libstdc++-v3/include/bits/stl_queue.h
libstdc++-v3/include/bits/stl_set.h
libstdc++-v3/include/bits/stl_stack.h
libstdc++-v3/include/bits/stl_vector.h
libstdc++-v3/include/bits/unordered_map.h
libstdc++-v3/include/bits/unordered_set.h
libstdc++-v3/include/bits/vector.tcc
libstdc++-v3/include/bits/version.def
libstdc++-v3/include/bits/version.h
libstdc++-v3/include/debug/deque
libstdc++-v3/include/debug/forward_list
libstdc++-v3/include/debug/list
libstdc++-v3/include/debug/map.h
libstdc++-v3/include/debug/multimap.h
libstdc++-v3/include/debug/multiset.h
libstdc++-v3/include/debug/set.h
libstdc++-v3/include/debug/unordered_map
libstdc++-v3/include/debug/unordered_set
libstdc++-v3/include/debug/vector
libstdc++-v3/include/std/deque
libstdc++-v3/include/std/forward_list
libstdc++-v3/include/std/list
libstdc++-v3/include/std/map
libstdc++-v3/include/std/queue
libstdc++-v3/include/std/set
libstdc++-v3/include/std/stack
libstdc++-v3/include/std/string
libstdc++-v3/include/std/unordered_map
libstdc++-v3/include/std/unordered_set
libstdc++-v3/include/std/vector
libstdc++-v3/testsuite/21_strings/basic_string/cons/from_range.cc
libstdc++-v3/testsuite/23_containers/deque/cons/from_range.cc
libstdc++-v3/testsuite/23_containers/forward_list/cons/from_range.cc
libstdc++-v3/testsuite/23_containers/list/cons/from_range.cc
libstdc++-v3/testsuite/23_containers/map/cons/from_range.cc
libstdc++-v3/testsuite/23_containers/multimap/cons/from_range.cc
libstdc++-v3/testsuite/23_containers/multiset/cons/from_range.cc
libstdc++-v3/testsuite/23_containers/priority_queue/cons_from_range.cc
libstdc++-v3/testsuite/23_containers/queue/cons_from_range.cc
libstdc++-v3/testsuite/23_containers/set/cons/from_range.cc
libstdc++-v3/testsuite/23_containers/stack/cons_from_range.cc
libstdc++-v3/testsuite/23_containers/unordered_map/cons/from_range.cc
libstdc++-v3/testsuite/23_containers/unordered_multimap/cons/from_range.cc
libstdc++-v3/testsuite/23_containers/unordered_multiset/cons/from_range.cc
libstdc++-v3/testsuite/23_containers/unordered_set/cons/from_range.cc
libstdc++-v3/testsuite/23_containers/vector/bool/cons/from_range.cc
libstdc++-v3/testsuite/23_containers/vector/cons/from_range.cc

index 7670bace4793ddfa2cee870329c8d531ab84e3d0..630ff1af8d3f5b6d3d25e12c9da25537b4ddd54a 100644 (file)
@@ -51,7 +51,7 @@
 # include <string_view>
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
 # include <bits/ranges_algobase.h>      // ranges::copy
 # include <bits/ranges_util.h>          // ranges::subrange
 #endif
@@ -506,7 +506,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
       _GLIBCXX_NOEXCEPT
       { _S_copy(__p, __k1, __k2 - __k1); }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       // pre: __n == ranges::distance(__rg). __p+[0,__n) is a valid range.
       template<typename _Rg>
        static constexpr void
@@ -737,7 +737,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
        __str._M_set_length(0);
       }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Construct a string from a range.
        * @since C++23
@@ -1573,7 +1573,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
       append(size_type __n, _CharT __c)
       { return _M_replace_aux(this->size(), size_type(0), __n, __c); }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Append a range to the string.
        * @param __rg A range of values that are convertible to `value_type`.
@@ -1884,7 +1884,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
        { return this->replace(begin(), end(), __first, __last); }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Assign a range to the string.
        * @param __rg A range of values that are convertible to `value_type`.
@@ -2052,7 +2052,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
         { this->replace(__p, __p, __beg, __end); }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Insert a range into the string.
        * @param __rg A range of values that are convertible to `value_type`.
@@ -2671,7 +2671,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
                             __k1.base(), __k2 - __k1);
       }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Replace part of the string with a range.
        * @param __rg A range of values that are convertible to `value_type`.
@@ -3773,7 +3773,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
                 const _Allocator& = _Allocator())
       -> basic_string<_CharT, _Traits, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           typename _Allocator = allocator<ranges::range_value_t<_Rg>>>
     basic_string(from_range_t, _Rg&&, _Allocator = _Allocator())
index 22a9814d2a8c66126f0989cad1561a7f89704be2..b250397151bbe6e78a9b9775184efdad443c3094 100644 (file)
@@ -639,7 +639,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 #endif
       }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Construct a string from a range.
        * @since C++23
@@ -1349,7 +1349,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       basic_string&
       append(size_type __n, _CharT __c);
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Append a range to the string.
        * @since C++23
@@ -1536,7 +1536,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        assign(_InputIterator __first, _InputIterator __last)
        { return this->replace(_M_ibegin(), _M_iend(), __first, __last); }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief  Set value to a range of characters.
        * @since C++23
@@ -1629,7 +1629,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        insert(iterator __p, _InputIterator __beg, _InputIterator __end)
        { this->replace(__p, __p, __beg, __end); }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Insert a range into the string.
        * @since C++23
@@ -2166,7 +2166,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
                             __k1.base(), __k2 - __k1);
       }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Replace part of the string with a range.
        * @since C++23
index 87ea1cebdaa30b530dffc0e508da45dbd7508e3a..dabb6ec5365940ec54b1c57b11039993fef88b49 100644 (file)
@@ -873,7 +873,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        }
       }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::forward_range _Rg>
     auto __advance_dist(_Rg& __rg)
     {
@@ -1022,7 +1022,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
             __guard.__n = size();
           }
        }
-#endif // ranges_to_container
+#endif // containers_ranges
 
    template<typename _Tp, typename _Alloc>
      void
index 84882a57b3a6cbe2f5023c5bbc3bb166382c0a7a..8bcfb809319e22fabf48e927d3f9feae7cedb5ec 100644 (file)
@@ -46,7 +46,7 @@
 #include <ext/alloc_traits.h>
 #include <ext/aligned_buffer.h>
 #include <debug/assertions.h>
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
 # include <bits/ranges_base.h> // ranges::begin, ranges::distance etc.
 # include <bits/ranges_util.h> // ranges::subrange
 #endif
@@ -896,7 +896,7 @@ namespace __fwdlist
        : _Base(_Node_alloc_type(__al))
        { _M_range_initialize(__first, __last); }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Construct a forward_list from a range.
        * @param __rg An input range with elements that are convertible to
@@ -918,7 +918,7 @@ namespace __fwdlist
              __to = __to->_M_next;
            }
        }
-#endif // ranges_to_container
+#endif // containers_ranges
 
       /**
        *  @brief  The %forward_list copy constructor.
@@ -1071,7 +1071,7 @@ namespace __fwdlist
        }
 #pragma GCC diagnostic pop
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Assign a range to a forward_list.
        * @since C++23
@@ -1102,7 +1102,7 @@ namespace __fwdlist
            insert_range_after(__prev,
                               ranges::subrange(std::move(__first), __last));
        }
-#endif // ranges_to_container
+#endif // containers_ranges
 
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wc++17-extensions" // if constexpr
@@ -1345,7 +1345,7 @@ namespace __fwdlist
       push_front(_Tp&& __val)
       { this->_M_insert_after(cbefore_begin(), std::move(__val)); }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Insert a range at the beginning of a forward_list.
        * @param __rg An input range with elements that are convertible to
@@ -1370,7 +1370,7 @@ namespace __fwdlist
          if (!__tmp.empty())
            splice_after(before_begin(), __tmp);
        }
-#endif // ranges_to_container
+#endif // containers_ranges
 
       /**
        *  @brief  Removes first element.
@@ -1491,7 +1491,7 @@ namespace __fwdlist
       insert_after(const_iterator __pos, std::initializer_list<_Tp> __il)
       { return insert_after(__pos, __il.begin(), __il.end()); }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Insert a rangeinto a forward_list.
        * @param  __position An iterator.
@@ -1515,7 +1515,7 @@ namespace __fwdlist
                             get_allocator());
          return _M_splice_after(__position, __tmp.before_begin(), __tmp.end());
        }
-#endif // ranges_to_container
+#endif // containers_ranges
 
       /**
        *  @brief  Removes the element pointed to by the iterator following
@@ -1953,7 +1953,7 @@ namespace __fwdlist
     forward_list(_InputIterator, _InputIterator, _Allocator = _Allocator())
       -> forward_list<_ValT, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           typename _Allocator = allocator<ranges::range_value_t<_Rg>>>
     forward_list(from_range_t, _Rg&&, _Allocator = _Allocator())
index 13bfbb3795bfe5ff70d2b0ca1a3fb30000b06e14..488907da44668421b91a3955cff9a724026ce5d8 100644 (file)
@@ -41,7 +41,7 @@
 #include <bits/max_size_type.h>
 #include <bits/version.h>
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
 # include <bits/utility.h> // for tuple_element_t
 #endif
 
@@ -1085,7 +1085,9 @@ namespace ranges
 #if __glibcxx_ranges_to_container // C++ >= 23
   struct from_range_t { explicit from_range_t() = default; };
   inline constexpr from_range_t from_range{};
+#endif
 
+#if __glibcxx_containers_ranges // C++ >= 23
 /// @cond undocumented
   template<typename _T1, typename _T2>
     struct pair;
index 03f6434604c3d690749e072433aa25ed4a6a6614..8cc2920c629fc8d3902dad2192b9a94a2aa53aa0 100644 (file)
@@ -896,7 +896,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Construct a vector from a range.
        * @param __rg A range of values that are convertible to `value_type`.
@@ -1026,7 +1026,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       { _M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Assign a range to the vector.
        * @param __rg A range of values that are convertible to `value_type`.
@@ -1347,7 +1347,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       { return this->insert(__p, __l.begin(), __l.end()); }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Insert a range into the vector.
        * @param __rg A range of values that are convertible to `bool`.
@@ -1458,7 +1458,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
              insert(end(), __tmp.begin(), __tmp.end());
            }
        }
-#endif // ranges_to_container
+#endif // containers_ranges
 
       _GLIBCXX20_CONSTEXPR
       void
index 94e08861010386c1db81eae03e5e54e37fff0a04..8d8ee575a26a22c435e4a43d8fbe7abf35cd8375 100644 (file)
@@ -1022,7 +1022,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Construct a deque from a range.
        * @param __rg A range of values that are convertible to `value_type`.
@@ -1150,7 +1150,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       { _M_assign_aux(__l.begin(), __l.end(), random_access_iterator_tag()); }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Assign a range to the deque.
        * @param __rg A range of values that are convertible to `value_type`.
@@ -1194,7 +1194,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
                emplace_back(*__first);
            }
        }
-#endif // ranges_to_container
+#endif // containers_ranges
 
 
       /// Get a copy of the memory allocation object.
@@ -1824,7 +1824,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Insert a range into the deque.
        * @param __rg A range of values that are convertible to `value_type`.
@@ -1854,7 +1854,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       template<__detail::__container_compatible_range<_Tp> _Rg>
        void
        append_range(_Rg&& __rg);
-#endif // ranges_to_container
+#endif // containers_ranges
 
       /**
        *  @brief  Remove element at given position.
@@ -2386,7 +2386,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
     deque(_InputIterator, _InputIterator, _Allocator = _Allocator())
       -> deque<_ValT, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           typename _Alloc = allocator<ranges::range_value_t<_Rg>>>
     deque(from_range_t, _Rg&&, _Alloc = _Alloc())
index 82ccb50ff1823ab2635c420398697ee99e159fa4..d27824c0a7af9e56a061114750fe9d7404b0b379 100644 (file)
@@ -66,7 +66,7 @@
 #include <bits/ptr_traits.h>
 #include <ext/aligned_buffer.h>
 #endif
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
 # include <bits/ranges_base.h> // ranges::begin, ranges::distance etc.
 # include <bits/ranges_util.h> // ranges::subrange
 #endif
@@ -1263,7 +1263,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
        }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Construct a list from a range.
        * @since C++23
@@ -1360,7 +1360,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
       }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Assign a range to a list.
        * @since C++23
@@ -1726,7 +1726,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
        }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Insert a range at the beginning of a list.
        * @param  __rg An input range of elements that can be converted to
@@ -1964,7 +1964,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
        }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Insert a range into a list.
        * @param  __position An iterator.
@@ -2594,7 +2594,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11
     list(_InputIterator, _InputIterator, _Allocator = _Allocator())
       -> list<_ValT, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           typename _Allocator = allocator<ranges::range_value_t<_Rg>>>
     list(from_range_t, _Rg&&, _Allocator = _Allocator())
index 9381a7930af7d20a8b308d6e9de53e47a1be50d3..006ff46dfb5df88be51ff10c6275a08a32c4ffb1 100644 (file)
@@ -62,7 +62,7 @@
 #include <initializer_list>
 #include <tuple>
 #endif
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
 # include <bits/ranges_base.h> // ranges::begin, ranges::distance etc.
 #endif
 
@@ -308,7 +308,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        : _M_t(__comp, _Pair_alloc_type(__a))
        { _M_t._M_insert_range_unique(__first, __last); }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Builds a %map from a range.
        * @since C++23
@@ -903,7 +903,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       { insert(__list.begin(), __list.end()); }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        *  @brief Inserts a range of elements.
        *  @since C++23
@@ -1536,7 +1536,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
     map(initializer_list<pair<_Key, _Tp>>, _Allocator)
     -> map<_Key, _Tp, less<_Key>, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           __not_allocator_like _Compare = less<__detail::__range_key_type<_Rg>>,
           __allocator_like _Alloc =
index 8fca3a4275a4d4d32fd71c49880e4e5339d16748..4ee4a842b314217cbab6887759bdbd5ba697ba3d 100644 (file)
@@ -60,7 +60,7 @@
 #if __cplusplus >= 201103L
 #include <initializer_list>
 #endif
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
 # include <bits/ranges_base.h> // ranges::begin, ranges::distance etc.
 #endif
 
@@ -297,7 +297,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        : _M_t(__comp, _Pair_alloc_type(__a))
        { _M_t._M_insert_range_equal(__first, __last); }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Builds a %multimap from a range.
        * @since C++23
@@ -655,7 +655,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       { this->insert(__l.begin(), __l.end()); }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        *  @brief Inserts a range of elements.
        *  @since C++23
@@ -1159,7 +1159,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
     multimap(initializer_list<pair<_Key, _Tp>>, _Allocator)
     -> multimap<_Key, _Tp, less<_Key>, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           __not_allocator_like _Compare = less<__detail::__range_key_type<_Rg>>,
           __allocator_like _Alloc =
index 7030f286750d5759c38b5a60549abec42a1e9e42..31451abe58e723a615515e3472f1c5ed6c1b2c2a 100644 (file)
@@ -60,7 +60,7 @@
 #if __cplusplus >= 201103L
 #include <initializer_list>
 #endif
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
 # include <bits/ranges_base.h> // ranges::begin, ranges::distance etc.
 #endif
 
@@ -274,7 +274,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        : _M_t(_Key_alloc_type(__a))
        { _M_t._M_insert_range_equal(__first, __last); }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Builds a %multiset from a range.
        * @since C++23
@@ -588,7 +588,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       { this->insert(__l.begin(), __l.end()); }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        *  @brief Inserts a range of elements.
        *  @since C++23
@@ -996,7 +996,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
     multiset(initializer_list<_Key>, _Allocator)
     -> multiset<_Key, less<_Key>, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           __not_allocator_like _Compare = less<ranges::range_value_t<_Rg>>,
           __allocator_like _Alloc = std::allocator<ranges::range_value_t<_Rg>>>
index 2a4b62918a0a4a5b15914c8429bc84f12aafd59d..554e076aae903eaa4472f797884c33dfe022747c 100644 (file)
@@ -61,7 +61,7 @@
 #if __cplusplus >= 201103L
 # include <bits/uses_allocator.h>
 #endif
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
 # include <ranges> // ranges::to
 # include <bits/ranges_algobase.h> // ranges::copy
 #endif
@@ -213,7 +213,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        : c(__first, __last, __a) { }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Construct a queue from a range.
        * @since C++23
@@ -326,7 +326,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 #endif
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       template<__detail::__container_compatible_range<_Tp> _Rg>
        void
        push_range(_Rg&& __rg)
@@ -397,7 +397,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     -> queue<_ValT, deque<_ValT, _Allocator>>;
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg>
     queue(from_range_t, _Rg&&) -> queue<ranges::range_value_t<_Rg>>;
 
@@ -766,7 +766,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Construct a priority_queue from a range.
        * @since C++23
@@ -849,7 +849,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       template<__detail::__container_compatible_range<_Tp> _Rg>
        void
        push_range(_Rg&& __rg)
@@ -924,7 +924,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     priority_queue(_Compare, _Container, _Allocator)
     -> priority_queue<typename _Container::value_type, _Container, _Compare>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           __not_allocator_like _Compare = less<ranges::range_value_t<_Rg>>,
           __allocator_like _Alloc = std::allocator<ranges::range_value_t<_Rg>>>
index 124237edf8edd8018b3b04a74fa39d1e4653b083..0799fd0918a3b167f3f5b4fa0b6ffbf4061177dc 100644 (file)
@@ -60,7 +60,7 @@
 #if __cplusplus >= 201103L
 #include <initializer_list>
 #endif
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
 # include <bits/ranges_base.h> // ranges::begin, ranges::distance etc.
 #endif
 
@@ -278,7 +278,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        : _M_t(_Key_alloc_type(__a))
        { _M_t._M_insert_range_unique(__first, __last); }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Builds a %set from a range.
        * @since C++23
@@ -603,7 +603,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       { this->insert(__l.begin(), __l.end()); }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        *  @brief Inserts a range of elements.
        *  @since C++23
@@ -1014,7 +1014,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
     set(initializer_list<_Key>, _Allocator)
     -> set<_Key, less<_Key>, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           __not_allocator_like _Compare = less<ranges::range_value_t<_Rg>>,
           __allocator_like _Alloc = std::allocator<ranges::range_value_t<_Rg>>>
index 2a274bf4c3af514a4a4195141912656e4984f86f..7b324642b322546c102bb4217b09b58167b6b286 100644 (file)
@@ -61,7 +61,7 @@
 #if __cplusplus >= 201103L
 # include <bits/uses_allocator.h>
 #endif
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
 # include <ranges> // ranges::to
 # include <bits/ranges_algobase.h> // ranges::copy
 #endif
@@ -181,7 +181,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
        : c(__first, __last) { }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Construct a stack from a range.
        * @since C++23
@@ -300,7 +300,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 #endif
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       template<__detail::__container_compatible_range<_Tp> _Rg>
        void
        push_range(_Rg&& __rg)
@@ -371,7 +371,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     -> stack<_ValT, deque<_ValT, _Allocator>>;
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg>
     stack(from_range_t, _Rg&&) -> stack<ranges::range_value_t<_Rg>>;
 
index 458adc987dacf47ac05e2c131109955408ff5239..aff9d5d9ca5b791bd25c6100a63d3f7fd8092d7d 100644 (file)
@@ -68,7 +68,7 @@
 #if __glibcxx_concepts // C++ >= C++20
 # include <bits/ranges_base.h>          // ranges::distance
 #endif
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
 # include <bits/ranges_algobase.h>      // ranges::copy
 # include <bits/ranges_util.h>          // ranges::subrange
 #endif
@@ -407,7 +407,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        this->_M_impl._M_end_of_storage = this->_M_impl._M_start + __n;
       }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       // Called by insert_range, and indirectly by assign_range, append_range.
       // Initializes new elements in storage at __ptr and updates __ptr to
       // point after the last new element.
@@ -763,7 +763,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Construct a vector from a range.
        * @param __rg A range of values that are convertible to `bool`.
@@ -926,7 +926,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Assign a range to the vector.
        * @param __rg A range of values that are convertible to `value_type`.
@@ -982,7 +982,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
                }
            }
        }
-#endif // ranges_to_container
+#endif // containers_ranges
 
       /// Get a copy of the memory allocation object.
       using _Base::get_allocator;
@@ -1648,7 +1648,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
        }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Insert a range into the vector.
        * @param __rg A range of values that are convertible to `value_type`.
@@ -1769,7 +1769,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
              append_range(__r); // This will take the fast path above.
            }
        }
-#endif // ranges_to_container
+#endif // containers_ranges
 
       /**
        *  @brief  Remove element at given position.
@@ -2313,7 +2313,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
     vector(_InputIterator, _InputIterator, _Allocator = _Allocator())
       -> vector<_ValT, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           typename _Alloc = allocator<ranges::range_value_t<_Rg>>>
     vector(from_range_t, _Rg&&, _Alloc = _Alloc())
index 49e97e2dfca9ef58b57654f5f91c58534617a80c..5bc58e849ffa5c50395a36415e9a4381ab4a84d1 100644 (file)
@@ -34,7 +34,7 @@
 #include <bits/allocator.h>
 #include <bits/functional_hash.h> // hash
 #include <bits/stl_function.h>    // equal_to
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
 # include <bits/ranges_base.h> // ranges::begin, ranges::distance etc.
 #endif
 
@@ -277,7 +277,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       : unordered_map(__l, __n, __hf, key_equal(), __a)
       { }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        *  @brief  Builds an %unordered_map from a range.
        *  @since C++23
@@ -681,7 +681,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       insert(initializer_list<value_type> __l)
       { _M_h.insert(__l); }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        *  @brief Inserts a range of elements.
        *  @since C++23
@@ -1291,7 +1291,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
                  _Hash, _Allocator)
     -> unordered_map<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           __not_allocator_like _Hash = hash<__detail::__range_key_type<_Rg>>,
           __not_allocator_like _Pred = equal_to<__detail::__range_key_type<_Rg>>,
@@ -1530,7 +1530,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       : unordered_multimap(__l, __n, __hf, key_equal(), __a)
       { }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        *  @brief  Builds an %unordered_multimap from a range.
        *  @since C++23
@@ -1802,7 +1802,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       insert(initializer_list<value_type> __l)
       { _M_h.insert(__l); }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        *  @brief Inserts a range of elements.
        *  @since C++23
@@ -2311,7 +2311,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
                       _Hash, _Allocator)
     -> unordered_multimap<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           __not_allocator_like _Hash = hash<__detail::__range_key_type<_Rg>>,
           __not_allocator_like _Pred = equal_to<__detail::__range_key_type<_Rg>>,
index 4bc256c17c1edf7268ee14cef7620965e10f2378..091bae60e5556c552325e44f53a4f95c9da882f0 100644 (file)
@@ -34,7 +34,7 @@
 #include <bits/allocator.h>
 #include <bits/functional_hash.h> // hash
 #include <bits/stl_function.h>    // equal_to
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
 # include <bits/ranges_base.h> // ranges::begin, ranges::distance etc.
 #endif
 
@@ -271,7 +271,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       : unordered_set(__l, __n, __hf, key_equal(), __a)
       { }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        *  @brief  Builds an %unordered_set from a range.
        *  @since C++23
@@ -533,7 +533,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       insert(initializer_list<value_type> __l)
       { _M_h.insert(__l); }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        *  @brief Inserts a range of elements.
        *  @since C++23
@@ -1013,7 +1013,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
                  unordered_set<int>::size_type, _Hash, _Allocator)
     -> unordered_set<_Tp, _Hash, equal_to<_Tp>, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           __not_allocator_like _Hash = hash<ranges::range_value_t<_Rg>>,
           __not_allocator_like _Pred = equal_to<ranges::range_value_t<_Rg>>,
@@ -1249,7 +1249,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       : unordered_multiset(__l, __n, __hf, key_equal(), __a)
       { }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        *  @brief  Builds an %unordered_multiset from a range.
        *  @since C++23
@@ -1483,7 +1483,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
       insert(initializer_list<value_type> __l)
       { _M_h.insert(__l); }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        *  @brief Inserts a range of elements.
        *  @since C++23
@@ -1977,7 +1977,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
                       unordered_multiset<int>::size_type, _Hash, _Allocator)
     -> unordered_multiset<_Tp, _Hash, equal_to<_Tp>, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           __not_allocator_like _Hash = hash<ranges::range_value_t<_Rg>>,
           __not_allocator_like _Pred = equal_to<ranges::range_value_t<_Rg>>,
index 66d73b4cfd7e76f88f9b911f431008ce1c947d9a..b21e1d3b7a2c73586904ba098899905aa2dd1689 100644 (file)
@@ -977,7 +977,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
          }
       }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<typename _Tp, typename _Alloc>
     template<__detail::__container_compatible_range<_Tp> _Rg>
       constexpr auto
@@ -1100,7 +1100,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
          return insert_range(__pos, vector(from_range, std::forward<_Rg>(__rg),
                                            _M_get_Tp_allocator()));
       }
-#endif // ranges_to_container
+#endif // containers_ranges
 
   // vector<bool>
   template<typename _Alloc>
index 2ec1b40bd38fc5a432295ac3aaa738f2debd8a30..0afaf0dec244efc580cb3e8064745527d8a062c9 100644 (file)
@@ -1515,14 +1515,14 @@ ftms = {
   };
 };
 
-//ftms = {
-//  name = containers_ranges;
-//  values = {
-//    v = 202202;
-//    cxxmin = 23;
-//    hosted = yes;
-//  };
-//};
+ftms = {
+  name = containers_ranges;
+  values = {
+    v = 202202;
+    cxxmin = 23;
+    hosted = yes;
+  };
+};
 
 ftms = {
   name = ranges_to_container;
index 04c1349c84bbbd1350e61c5653ed224a5530b9bc..980fee641e9dae386cd1a0e76c73fc32996292f8 100644 (file)
 #endif /* !defined(__cpp_lib_reference_from_temporary) && defined(__glibcxx_want_reference_from_temporary) */
 #undef __glibcxx_want_reference_from_temporary
 
+#if !defined(__cpp_lib_containers_ranges)
+# if (__cplusplus >= 202100L) && _GLIBCXX_HOSTED
+#  define __glibcxx_containers_ranges 202202L
+#  if defined(__glibcxx_want_all) || defined(__glibcxx_want_containers_ranges)
+#   define __cpp_lib_containers_ranges 202202L
+#  endif
+# endif
+#endif /* !defined(__cpp_lib_containers_ranges) && defined(__glibcxx_want_containers_ranges) */
+#undef __glibcxx_want_containers_ranges
+
 #if !defined(__cpp_lib_ranges_to_container)
 # if (__cplusplus >= 202100L) && _GLIBCXX_HOSTED
 #  define __glibcxx_ranges_to_container 202202L
index 9715721ca52169a222e9eb4896a2f767aa4da413..59d60b2120dbe1b9e26dd9df1ab61f8a953ab9ff 100644 (file)
@@ -155,7 +155,7 @@ namespace __debug
                __gnu_debug::__base(__last), __a)
        { }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       template<__detail::__container_compatible_range<_Tp> _Rg>
        deque(from_range_t, _Rg&& __rg, const _Allocator& __a = _Allocator())
        : _Base(from_range, std::forward<_Rg>(__rg), __a)
@@ -217,7 +217,7 @@ namespace __debug
       }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       template<std::__detail::__container_compatible_range<_Tp> _Rg>
        void
        assign_range(_Rg&& __rg)
@@ -561,7 +561,7 @@ namespace __debug
        }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       template<__detail::__container_compatible_range<_Tp> _Rg>
        iterator
        insert_range(const_iterator __pos, _Rg&& __rg)
@@ -712,7 +712,7 @@ namespace __debug
     deque(size_t, _Tp, _Allocator = _Allocator())
       -> deque<_Tp, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           typename _Alloc = allocator<ranges::range_value_t<_Rg>>>
     deque(from_range_t, _Rg&&, _Alloc = _Alloc())
index 00b96d6fae48b3c508d5979ff3b206b5d8d77700..60a254297d543897abeb22e5d67dfe1470887ced 100644 (file)
@@ -267,7 +267,7 @@ namespace __debug
                __gnu_debug::__base(__last), __al)
        { }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       template<__detail::__container_compatible_range<_Tp> _Rg>
        forward_list(from_range_t, _Rg&& __rg, const _Alloc& __a = _Alloc())
        : _Base(std::from_range, std::forward<_Rg>(__rg), __a)
@@ -318,7 +318,7 @@ namespace __debug
          this->_M_invalidate_all();
        }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       template<__detail::__container_compatible_range<_Tp> _Rg>
        void
        assign_range(_Rg&& __rg)
@@ -440,7 +440,7 @@ namespace __debug
       using _Base::emplace_front;
       using _Base::push_front;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       using _Base::prepend_range;
 #endif
 
@@ -512,7 +512,7 @@ namespace __debug
        return { _Base::insert_after(__pos.base(), __il), this };
       }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       template<__detail::__container_compatible_range<_Tp> _Rg>
        iterator
        insert_range_after(const_iterator __position, _Rg&& __rg)
@@ -917,7 +917,7 @@ namespace __debug
     forward_list(size_t, _Tp, _Allocator = _Allocator())
       -> forward_list<_Tp, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           typename _Allocator = allocator<ranges::range_value_t<_Rg>>>
     forward_list(from_range_t, _Rg&&, _Allocator = _Allocator())
index 344fc98c05fc27d0823211768eca96c212b1b6ee..a9d974c40a5d575ce3a815afbdea64a2ca2565b1 100644 (file)
@@ -160,7 +160,7 @@ namespace __debug
                __gnu_debug::__base(__last), __a)
        { }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       template<__detail::__container_compatible_range<_Tp> _Rg>
        list(from_range_t, _Rg&& __rg, const _Allocator& __a = _Allocator())
        : _Base(std::from_range, std::forward<_Rg>(__rg), __a)
@@ -214,7 +214,7 @@ namespace __debug
          this->_M_invalidate_all();
        }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       template<__detail::__container_compatible_range<_Tp> _Rg>
        void
        assign_range(_Rg&& __rg)
@@ -434,7 +434,7 @@ namespace __debug
       using _Base::emplace_front;
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       using _Base::prepend_range;
       using _Base::append_range;
 #endif
@@ -549,7 +549,7 @@ namespace __debug
        }
 #endif
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       template<__detail::__container_compatible_range<_Tp> _Rg>
        iterator
        insert_range(const_iterator __position, _Rg&& __rg)
@@ -970,7 +970,7 @@ namespace __debug
     list(size_t, _Tp, _Allocator = _Allocator())
       -> list<_Tp, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           typename _Allocator = allocator<ranges::range_value_t<_Rg>>>
     list(from_range_t, _Rg&&, _Allocator = _Allocator())
index aa1c1dbd47aafd63f5637ffad274a7649fa732e0..985a7ac86d3c59565d54029a9a8dd583cce89da5 100644 (file)
@@ -133,7 +133,7 @@ namespace __debug
                __gnu_debug::__base(__last), __a)
        { }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Construct a map from a range.
        * @since C++23
@@ -759,7 +759,7 @@ namespace __debug
     map(initializer_list<pair<_Key, _Tp>>, _Allocator)
     -> map<_Key, _Tp, less<_Key>, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           __not_allocator_like _Compare = less<__detail::__range_key_type<_Rg>>,
           __allocator_like _Alloc =
index bef1f174a8e0c3c7106aae9f028552faea2d9eb3..c187e5191b1bfdc6dcafb4ebe8387b6f4e4a9b54 100644 (file)
@@ -133,7 +133,7 @@ namespace __debug
                  __glibcxx_check_valid_constructor_range(__first, __last)),
                __gnu_debug::__base(__last), __a) { }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Construct a multimap from a range.
        * @since C++23
@@ -641,7 +641,7 @@ namespace __debug
     multimap(initializer_list<pair<_Key, _Tp>>, _Allocator)
     -> multimap<_Key, _Tp, less<_Key>, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           __not_allocator_like _Compare = less<__detail::__range_key_type<_Rg>>,
           __allocator_like _Alloc =
index bddcd282bfa2499d2ccd1e43f2313dda660755e9..41bf78d04b2acdae515ce47d7e2e2d454b89d49e 100644 (file)
@@ -133,7 +133,7 @@ namespace __debug
                  __glibcxx_check_valid_constructor_range(__first, __last)),
                __gnu_debug::__base(__last), __a) { }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Construct a multiset from a range.
        * @since C++23
@@ -613,7 +613,7 @@ namespace __debug
     multiset(initializer_list<_Key>, _Allocator)
     -> multiset<_Key, less<_Key>, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           __not_allocator_like _Compare = less<ranges::range_value_t<_Rg>>,
           __allocator_like _Alloc = std::allocator<ranges::range_value_t<_Rg>>>
index 9555555975f09056261ae39a372d366604ec6e31..6ec833821678d34453e55b923644d0ef9bdc618f 100644 (file)
@@ -131,7 +131,7 @@ namespace __debug
                  __glibcxx_check_valid_constructor_range(__first, __last)),
                __gnu_debug::__base(__last), __a) { }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Construct a set from a range.
        * @since C++23
@@ -623,7 +623,7 @@ namespace __debug
     set(initializer_list<_Key>, _Allocator)
     -> set<_Key, less<_Key>, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           __not_allocator_like _Compare = less<ranges::range_value_t<_Rg>>,
           __allocator_like _Alloc = std::allocator<ranges::range_value_t<_Rg>>>
index 16d4a4a98e0dc0a3f843fd2fc99de686b30a860a..448f681e16b2b1a96b79eb2e545a2c3797b2d6e8 100644 (file)
@@ -201,7 +201,7 @@ namespace __debug
       : unordered_map(__l, __n, __hf, key_equal(), __a)
       { }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       template<__detail::__container_compatible_range<value_type> _Rg>
        unordered_map(from_range_t, _Rg&& __rg,
                      size_type __n = 0,
@@ -869,7 +869,7 @@ namespace __debug
                  _Hash, _Allocator)
     -> unordered_map<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           __not_allocator_like _Hash = hash<__detail::__range_key_type<_Rg>>,
           __not_allocator_like _Pred = equal_to<__detail::__range_key_type<_Rg>>,
@@ -1077,7 +1077,7 @@ namespace __debug
       : unordered_multimap(__l, __n, __hf, key_equal(), __a)
       { }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       template<__detail::__container_compatible_range<value_type> _Rg>
        unordered_multimap(from_range_t, _Rg&& __rg,
                           size_type __n = 0,
@@ -1655,7 +1655,7 @@ namespace __debug
                       _Hash, _Allocator)
     -> unordered_multimap<_Key, _Tp, _Hash, equal_to<_Key>, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           __not_allocator_like _Hash = hash<__detail::__range_key_type<_Rg>>,
           __not_allocator_like _Pred = equal_to<__detail::__range_key_type<_Rg>>,
index 2e342ccbd97857cd58df076912c36618fc809e68..4255f6ee77000c564fa9a0256b4385ff81edcab2 100644 (file)
@@ -194,7 +194,7 @@ namespace __debug
       : unordered_set(__l, __n, __hf, key_equal(), __a)
       { }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       template<__detail::__container_compatible_range<value_type> _Rg>
        unordered_set(from_range_t, _Rg&& __rg,
                      size_type __n = 0,
@@ -902,7 +902,7 @@ namespace __debug
       : unordered_multiset(__l, __n, __hf, key_equal(), __a)
       { }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       template<__detail::__container_compatible_range<value_type> _Rg>
        unordered_multiset(from_range_t, _Rg&& __rg,
                           size_type __n = 0,
@@ -1444,7 +1444,7 @@ namespace __debug
                       unordered_multiset<int>::size_type, _Hash, _Allocator)
     -> unordered_multiset<_Tp, _Hash, equal_to<_Tp>, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           __not_allocator_like _Hash = hash<ranges::range_value_t<_Rg>>,
           __not_allocator_like _Pred = equal_to<ranges::range_value_t<_Rg>>,
@@ -1479,7 +1479,7 @@ namespace __debug
                     equal_to<ranges::range_value_t<_Rg>>,
                     _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           __not_allocator_like _Hash = hash<ranges::range_value_t<_Rg>>,
           __not_allocator_like _Pred = equal_to<ranges::range_value_t<_Rg>>,
index b49766c18a76ea2a68b4bbeaaac8343660d31be1..1b3486b0dc08ded11b87d01b729d1f5dfb4bf9ed 100644 (file)
@@ -244,7 +244,7 @@ namespace __debug
             const allocator_type& __a = allocator_type())
       : _Base(__l, __a) { }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       /**
        * @brief Construct a vector from a range.
        * @since C++23
@@ -871,7 +871,7 @@ namespace __debug
       const _Base&
       _M_base() const _GLIBCXX_NOEXCEPT { return *this; }
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
       template<std::__detail::__container_compatible_range<_Tp> _Rg>
        constexpr void
        assign_range(_Rg&& __rg)
@@ -999,7 +999,7 @@ namespace __debug
     vector(size_t, _Tp, _Allocator = _Allocator())
       -> vector<_Tp, _Allocator>;
 
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
   template<ranges::input_range _Rg,
           typename _Alloc = allocator<ranges::range_value_t<_Rg>>>
     vector(from_range_t, _Rg&&, _Alloc = _Alloc())
index 8fd7300f2de152da11a5c20896e84d83e946c08e..2badab80a6dc6175a860df9bcf624061218973f4 100644 (file)
@@ -72,6 +72,7 @@
 
 #define __glibcxx_want_algorithm_default_value_type
 #define __glibcxx_want_allocator_traits_is_always_equal
+#define __glibcxx_want_containers_ranges
 #define __glibcxx_want_erase_if
 #define __glibcxx_want_nonmember_container_access
 #include <bits/version.h>
index 166fdb04242ae5781cc0aa3ae9455d715cc9c398..d478851acf9fdab364c2a99cc7e79cd8f752a306 100644 (file)
@@ -49,6 +49,7 @@
 
 #define __glibcxx_want_algorithm_default_value_type
 #define __glibcxx_want_allocator_traits_is_always_equal
+#define __glibcxx_want_containers_ranges
 #define __glibcxx_want_erase_if
 #define __glibcxx_want_incomplete_container_elements
 #define __glibcxx_want_list_remove_return_type
index 170499d65f718a13cd61b0dd0c10f8ef42e30dea..2ba0599d33df8f7ac6ff4097a448cf75edb2a265 100644 (file)
@@ -73,6 +73,7 @@
 
 #define __glibcxx_want_algorithm_default_value_type
 #define __glibcxx_want_allocator_traits_is_always_equal
+#define __glibcxx_want_containers_ranges
 #define __glibcxx_want_erase_if
 #define __glibcxx_want_incomplete_container_elements
 #define __glibcxx_want_list_remove_return_type
index 16a397fceccd3b12fd04a5d6930117b8e85e3c45..6bfb53848ba089b6c521199634e9426e74f4c514 100644 (file)
@@ -72,6 +72,7 @@
 #endif
 
 #define __glibcxx_want_allocator_traits_is_always_equal
+#define __glibcxx_want_containers_ranges
 #define __glibcxx_want_erase_if
 #define __glibcxx_want_generic_associative_lookup
 #define __glibcxx_want_map_try_emplace
index c06a4c370900a49dc78c703c479caf9048be892f..74b6c07b49f16ea92ddd53090d5b8d2898f302f5 100644 (file)
@@ -68,6 +68,7 @@
 #include <bits/stl_queue.h>
 
 #define __glibcxx_want_adaptor_iterator_pair_constructor
+#define __glibcxx_want_containers_ranges
 #include <bits/version.h>
 
 #endif /* _GLIBCXX_QUEUE */
index 2ebf485ce5592d709190337e2c5c700592527e81..cf7057aa6c634817c1e45f6de074217f60da12e7 100644 (file)
@@ -72,6 +72,7 @@
 #endif
 
 #define __glibcxx_want_allocator_traits_is_always_equal
+#define __glibcxx_want_containers_ranges
 #define __glibcxx_want_erase_if
 #define __glibcxx_want_generic_associative_lookup
 #define __glibcxx_want_node_extract
index 2f7951a6fbca21c5f1ca6cf33d4442291837df08..5cea4762a1923d9ccd35609eceef9b47de943973 100644 (file)
@@ -65,6 +65,7 @@
 #include <bits/stl_stack.h>
 
 #define __glibcxx_want_adaptor_iterator_pair_constructor
+#define __glibcxx_want_containers_ranges
 #include <bits/version.h>
 
 #endif /* _GLIBCXX_STACK */
index 6211da9a7bcd22c818e44be554d494d3aada7b60..71864715ff755fb44fbd4b600c16dd8a61a8ac3a 100644 (file)
@@ -60,6 +60,7 @@
 #define __glibcxx_want_allocator_traits_is_always_equal
 #define __glibcxx_want_constexpr_char_traits
 #define __glibcxx_want_constexpr_string
+#define __glibcxx_want_containers_ranges
 #define __glibcxx_want_erase_if
 #define __glibcxx_want_nonmember_container_access
 #define __glibcxx_want_string_resize_and_overwrite
index 37f227368da3abbdfbf04535f2a3e16b4a205e61..3ae25d758ace96866b23b1fa124f9f3af6aa32d6 100644 (file)
@@ -49,6 +49,7 @@
 #endif
 
 #define __glibcxx_want_allocator_traits_is_always_equal
+#define __glibcxx_want_containers_ranges
 #define __glibcxx_want_erase_if
 #define __glibcxx_want_generic_unordered_lookup
 #define __glibcxx_want_node_extract
index 4c73e5d7875ac73261beca2445e7384f759277cc..b561163d31d2d9e88630455c74bd28c71e0af2a0 100644 (file)
@@ -49,6 +49,7 @@
 #endif
 
 #define __glibcxx_want_allocator_traits_is_always_equal
+#define __glibcxx_want_containers_ranges
 #define __glibcxx_want_erase_if
 #define __glibcxx_want_generic_unordered_lookup
 #define __glibcxx_want_node_extract
index 8bb2543d9afebed8b9c75fdd245d33de5f25f082..a98ffb179ec0ebc7900fade334b229f797a3eb95 100644 (file)
@@ -81,6 +81,7 @@
 #define __glibcxx_want_algorithm_default_value_type
 #define __glibcxx_want_allocator_traits_is_always_equal
 #define __glibcxx_want_constexpr_vector
+#define __glibcxx_want_containers_ranges
 #define __glibcxx_want_erase_if
 #define __glibcxx_want_incomplete_container_elements
 #define __glibcxx_want_nonmember_container_access
index 0795cb41ee96b9fbdb38ac14cd218c306930341a..6331050309ce8519070ae7f1eef8a21a0f1c6195 100644 (file)
@@ -1,6 +1,11 @@
 // { dg-do run { target c++23 } }
 
 #include <string>
+
+#if __cpp_lib_containers_ranges != 202202L
+# error "Feature-test macro __cpp_lib_containers_ranges has wrong value in <string>"
+#endif
+
 #include <span>
 #include <testsuite_hooks.h>
 #include <testsuite_iterators.h>
index 96e994d649c154d07987fe964e95a7d88511141f..48fd1965f9a557ffb9d64337f21bceb80fddddd6 100644 (file)
@@ -1,6 +1,11 @@
 // { dg-do run { target c++23 } }
 
 #include <deque>
+
+#if __cpp_lib_containers_ranges != 202202L
+# error "Feature-test macro __cpp_lib_containers_ranges has wrong value in <deque>"
+#endif
+
 #include <span>
 #include <testsuite_hooks.h>
 #include <testsuite_iterators.h>
index 65b378e69773333222fc8e35b7df7ff28ad1bcf3..aa7010531f57aa143a05c4c387fde92a9e2c98aa 100644 (file)
@@ -1,11 +1,15 @@
 // { dg-do run { target c++23 } }
 
 #include <forward_list>
+
+#if __cpp_lib_containers_ranges != 202202L
+# error "Feature-test macro __cpp_lib_containers_ranges has wrong value in <forward_list>"
+#endif
+
 #include <span>
 #include <testsuite_hooks.h>
 #include <testsuite_iterators.h>
 #include <testsuite_allocator.h>
-
 void
 test_deduction_guide(long* p)
 {
index 31448b9122b40b07d1b8a7ca127d1e66bff0ee8b..107ad7477ce4bd76f1be746d3bc0f27f3b8a0539 100644 (file)
@@ -1,6 +1,11 @@
 // { dg-do run { target c++23 } }
 
 #include <list>
+
+#if __cpp_lib_containers_ranges != 202202L
+# error "Feature-test macro __cpp_lib_containers_ranges has wrong value in <list>"
+#endif
+
 #include <span>
 #include <testsuite_hooks.h>
 #include <testsuite_iterators.h>
index c740471f2da12f9b76f18ce90daab84ea29213c6..9935f44aa0f9fd69d17d42d92f9b5b10757bc658 100644 (file)
@@ -1,7 +1,12 @@
 // { dg-do run { target c++23 } }
 
-#include <algorithm>
 #include <map>
+
+#if __cpp_lib_containers_ranges != 202202L
+# error "Feature-test macro __cpp_lib_containers_ranges has wrong value in <map>"
+#endif
+
+#include <algorithm>
 #include <ranges>
 #include <span>
 #include <testsuite_allocator.h>
index 3e456f566ccc919b2e1ca576721dbe8cd855888b..4a8ea9fec7d70a6b8e555a53a0156b265463d3d0 100644 (file)
@@ -1,7 +1,12 @@
 // { dg-do run { target c++23 } }
 
-#include <algorithm>
 #include <map>
+
+#if __cpp_lib_containers_ranges != 202202L
+# error "Feature-test macro __cpp_lib_containers_ranges has wrong value in <map>"
+#endif
+
+#include <algorithm>
 #include <ranges>
 #include <span>
 #include <testsuite_allocator.h>
index 43821ca556ac1ee3512def83e31c734f0ce77ecf..cdba7eb2d63210d3618dc952708912de80cc9b1e 100644 (file)
@@ -1,8 +1,13 @@
 // { dg-do run { target c++23 } }
 
+#include <set>
+
+#if __cpp_lib_containers_ranges != 202202L
+# error "Feature-test macro __cpp_lib_containers_ranges has wrong value in <set>"
+#endif
+
 #include <algorithm>
 #include <ranges>
-#include <set>
 #include <span>
 #include <testsuite_allocator.h>
 #include <testsuite_hooks.h>
index 977ef981b871db5af2695ca98ae8d4fb77184370..87e404bdade599210a45cabe443a52d4fe4dd5cc 100644 (file)
@@ -1,7 +1,12 @@
 // { dg-do run { target c++23 } }
 
-#include <algorithm>
 #include <queue>
+
+#if __cpp_lib_containers_ranges != 202202L
+# error "Feature-test macro __cpp_lib_containers_ranges has wrong value in <queue>"
+#endif
+
+#include <algorithm>
 #include <ranges>
 #include <span>
 #include <testsuite_allocator.h>
index c21f52cb1e2efb7a6e27571322000362988f8e07..039d084fc040aca6075ba1a0ccc9b76337d21608 100644 (file)
@@ -1,7 +1,12 @@
 // { dg-do run { target c++23 } }
 
-#include <list>
 #include <queue>
+
+#if __cpp_lib_containers_ranges != 202202L
+# error "Feature-test macro __cpp_lib_containers_ranges has wrong value in <queue>"
+#endif
+
+#include <list>
 #include <span>
 #include <testsuite_allocator.h>
 #include <testsuite_hooks.h>
index 869326f8976588292b7b4f60a3aad85f1ced8c77..efde05d729cf51cc8fa32e60b9c3a01c73a1fb87 100644 (file)
@@ -1,8 +1,13 @@
 // { dg-do run { target c++23 } }
 
+#include <set>
+
+#if __cpp_lib_containers_ranges != 202202L
+# error "Feature-test macro __cpp_lib_containers_ranges has wrong value in <set>"
+#endif
+
 #include <algorithm>
 #include <ranges>
-#include <set>
 #include <span>
 #include <testsuite_allocator.h>
 #include <testsuite_hooks.h>
index e957d0c4450a87b3d8ed8a11d99c2f826ec6106a..2ee52e1cf9a42ee6f625e292b280201c0e1ff40b 100644 (file)
@@ -1,8 +1,13 @@
 // { dg-do run { target c++23 } }
 
+#include <stack>
+
+#if __cpp_lib_containers_ranges != 202202L
+# error "Feature-test macro __cpp_lib_containers_ranges has wrong value in <span>"
+#endif
+
 #include <ranges>
 #include <span>
-#include <stack>
 #include <testsuite_allocator.h>
 #include <testsuite_hooks.h>
 #include <testsuite_iterators.h>
index 6d1da5bf5d18966ad16c1182e025c5ca6f7cd03f..36efc2de5a396158b2db23db847b2a3d7e2f2cf7 100644 (file)
@@ -1,7 +1,12 @@
 // { dg-do run { target c++23 } }
 
-#include <algorithm>
 #include <unordered_map>
+
+#if __cpp_lib_containers_ranges != 202202L
+# error "Feature-test macro __cpp_lib_containers_ranges has wrong value in <unordered_map>"
+#endif
+
+#include <algorithm>
 #include <span>
 #include <testsuite_allocator.h>
 #include <testsuite_hooks.h>
index 2ca93d344e9b61db07985111e53dd3d8849d8f1e..b551df49f3e71a4dd9d44907e53d5e1f5fb37f0d 100644 (file)
@@ -1,7 +1,12 @@
 // { dg-do run { target c++23 } }
 
-#include <algorithm>
 #include <unordered_map>
+
+#if __cpp_lib_containers_ranges != 202202L
+# error "Feature-test macro __cpp_lib_containers_ranges has wrong value in <unordered_map>"
+#endif
+
+#include <algorithm>
 #include <ranges>
 #include <span>
 #include <testsuite_allocator.h>
index 45c3848f5ce3ccf2ba0c886ff940303709caa38a..d44598d7d61507a02429e98a660ec784b67f5857 100644 (file)
@@ -1,7 +1,12 @@
 // { dg-do run { target c++23 } }
 
-#include <algorithm>
 #include <unordered_set>
+
+#if __cpp_lib_containers_ranges != 202202L
+# error "Feature-test macro __cpp_lib_containers_ranges has wrong value in <unordered_set>"
+#endif
+
+#include <algorithm>
 #include <ranges>
 #include <span>
 #include <testsuite_allocator.h>
index 0806045539f2e84ab48a255ce3b2c4232cfdfb21..8259be871f6e65f7c938c7ddd288c59424efe548 100644 (file)
@@ -1,7 +1,12 @@
 // { dg-do run { target c++23 } }
 
-#include <algorithm>
 #include <unordered_set>
+
+#if __cpp_lib_containers_ranges != 202202L
+# error "Feature-test macro __cpp_lib_containers_ranges has wrong value in <unordered_set>"
+#endif
+
+#include <algorithm>
 #include <span>
 #include <testsuite_allocator.h>
 #include <testsuite_hooks.h>
index 37f0ecf32ad77cb2194d7ad1ee02f7d04f8432da..339c06bd70e9cb6b4cd274af691e5d55b36f73b2 100644 (file)
@@ -1,5 +1,11 @@
 // { dg-do run { target c++23 } }
 
+#include <unordered_set>
+
+#if __cpp_lib_containers_ranges != 202202L
+# error "Feature-test macro __cpp_lib_containers_ranges has wrong value in <unordered_set>"
+#endif
+
 #include <vector>
 #include <span>
 #include <testsuite_hooks.h>
index ed2e3ca6ba1efed4f329e679eae1fabcca02b8e2..7a62645283d2d783d896085ffd3d1d5b1e1f9c0e 100644 (file)
@@ -1,6 +1,11 @@
 // { dg-do run { target c++23 } }
 
 #include <vector>
+
+#if __cpp_lib_containers_ranges != 202202L
+# error "Feature-test macro __cpp_lib_containers_ranges has wrong value in <vector>"
+#endif
+
 #include <span>
 #include <testsuite_hooks.h>
 #include <testsuite_iterators.h>