# 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
_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
__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
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`.
{ 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`.
{ 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`.
__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`.
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())
#endif
}
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
/**
* @brief Construct a string from a range.
* @since C++23
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
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
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
__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
}
}
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
template<ranges::forward_range _Rg>
auto __advance_dist(_Rg& __rg)
{
__guard.__n = size();
}
}
-#endif // ranges_to_container
+#endif // containers_ranges
template<typename _Tp, typename _Alloc>
void
#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
: _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
__to = __to->_M_next;
}
}
-#endif // ranges_to_container
+#endif // containers_ranges
/**
* @brief The %forward_list copy constructor.
}
#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
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
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
if (!__tmp.empty())
splice_after(before_begin(), __tmp);
}
-#endif // ranges_to_container
+#endif // containers_ranges
/**
* @brief Removes first element.
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.
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
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())
#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
#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;
}
#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`.
{ _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`.
{ 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`.
insert(end(), __tmp.begin(), __tmp.end());
}
}
-#endif // ranges_to_container
+#endif // containers_ranges
_GLIBCXX20_CONSTEXPR
void
}
#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`.
{ _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`.
emplace_back(*__first);
}
}
-#endif // ranges_to_container
+#endif // containers_ranges
/// Get a copy of the memory allocation object.
}
#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`.
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.
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())
#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
}
#endif
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
/**
* @brief Construct a list from a range.
* @since C++23
}
#endif
-#if __glibcxx_ranges_to_container // C++ >= 23
+#if __glibcxx_containers_ranges // C++ >= 23
/**
* @brief Assign a range to a list.
* @since C++23
}
#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
}
#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.
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())
#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
: _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
{ 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
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 =
#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
: _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
{ 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
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 =
#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
: _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
{ 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
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>>>
#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
: 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
#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)
-> 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>>;
}
#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
}
#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)
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>>>
#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
: _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
{ 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
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>>>
#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
: 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
#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)
-> 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>>;
#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
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.
}
#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`.
}
#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`.
}
}
}
-#endif // ranges_to_container
+#endif // containers_ranges
/// Get a copy of the memory allocation object.
using _Base::get_allocator;
}
#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`.
append_range(__r); // This will take the fast path above.
}
}
-#endif // ranges_to_container
+#endif // containers_ranges
/**
* @brief Remove element at given position.
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())
#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
: 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
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
_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>>,
: 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
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
_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>>,
#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
: 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
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
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>>,
: 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
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
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>>,
}
}
-#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
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>
};
};
-//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;
#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
__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)
}
#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)
}
#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)
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())
__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)
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)
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
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)
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())
__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)
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)
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
}
#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)
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())
__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
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 =
__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
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 =
__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
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>>>
__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
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>>>
: 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,
_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>>,
: 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,
_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>>,
: 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,
: 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,
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>>,
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>>,
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
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)
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())
#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>
#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
#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
#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
#include <bits/stl_queue.h>
#define __glibcxx_want_adaptor_iterator_pair_constructor
+#define __glibcxx_want_containers_ranges
#include <bits/version.h>
#endif /* _GLIBCXX_QUEUE */
#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
#include <bits/stl_stack.h>
#define __glibcxx_want_adaptor_iterator_pair_constructor
+#define __glibcxx_want_containers_ranges
#include <bits/version.h>
#endif /* _GLIBCXX_STACK */
#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
#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
#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
#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
// { 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>
// { 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>
// { 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)
{
// { 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>
// { 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>
// { 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>
// { 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>
// { 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>
// { 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>
// { 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>
// { 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>
// { 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>
// { 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>
// { 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>
// { 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>
// { 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>
// { 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>