diff options
Diffstat (limited to 'libstdc++-v3/include/debug')
-rw-r--r-- | libstdc++-v3/include/debug/debug.h | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/debug/deque | 8 | ||||
-rw-r--r-- | libstdc++-v3/include/debug/forward_list | 10 | ||||
-rw-r--r-- | libstdc++-v3/include/debug/list | 10 | ||||
-rw-r--r-- | libstdc++-v3/include/debug/map.h | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/debug/multimap.h | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/debug/multiset.h | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/debug/set.h | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/debug/unordered_map | 30 | ||||
-rw-r--r-- | libstdc++-v3/include/debug/unordered_set | 62 | ||||
-rw-r--r-- | libstdc++-v3/include/debug/vector | 6 |
11 files changed, 110 insertions, 34 deletions
diff --git a/libstdc++-v3/include/debug/debug.h b/libstdc++-v3/include/debug/debug.h index 0e02d58..0131c0a 100644 --- a/libstdc++-v3/include/debug/debug.h +++ b/libstdc++-v3/include/debug/debug.h @@ -58,7 +58,7 @@ namespace __gnu_debug using namespace std::__debug; template<typename _Ite, typename _Seq, typename _Cat> - struct _Safe_iterator; + class _Safe_iterator; } #if ! defined _GLIBCXX_DEBUG || ! _GLIBCXX_HOSTED diff --git a/libstdc++-v3/include/debug/deque b/libstdc++-v3/include/debug/deque index 9715721..59d60b2 100644 --- a/libstdc++-v3/include/debug/deque +++ b/libstdc++-v3/include/debug/deque @@ -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()) diff --git a/libstdc++-v3/include/debug/forward_list b/libstdc++-v3/include/debug/forward_list index 00b96d6..60a2542 100644 --- a/libstdc++-v3/include/debug/forward_list +++ b/libstdc++-v3/include/debug/forward_list @@ -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()) diff --git a/libstdc++-v3/include/debug/list b/libstdc++-v3/include/debug/list index 344fc98..a9d974c 100644 --- a/libstdc++-v3/include/debug/list +++ b/libstdc++-v3/include/debug/list @@ -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()) diff --git a/libstdc++-v3/include/debug/map.h b/libstdc++-v3/include/debug/map.h index aa1c1db..985a7ac 100644 --- a/libstdc++-v3/include/debug/map.h +++ b/libstdc++-v3/include/debug/map.h @@ -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 = diff --git a/libstdc++-v3/include/debug/multimap.h b/libstdc++-v3/include/debug/multimap.h index bef1f17..c187e51 100644 --- a/libstdc++-v3/include/debug/multimap.h +++ b/libstdc++-v3/include/debug/multimap.h @@ -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 = diff --git a/libstdc++-v3/include/debug/multiset.h b/libstdc++-v3/include/debug/multiset.h index bddcd28..41bf78d 100644 --- a/libstdc++-v3/include/debug/multiset.h +++ b/libstdc++-v3/include/debug/multiset.h @@ -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>>> diff --git a/libstdc++-v3/include/debug/set.h b/libstdc++-v3/include/debug/set.h index 9555555..6ec8338 100644 --- a/libstdc++-v3/include/debug/set.h +++ b/libstdc++-v3/include/debug/set.h @@ -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>>> diff --git a/libstdc++-v3/include/debug/unordered_map b/libstdc++-v3/include/debug/unordered_map index 16d4a4a..7673db1 100644 --- a/libstdc++-v3/include/debug/unordered_map +++ b/libstdc++-v3/include/debug/unordered_map @@ -175,6 +175,12 @@ namespace __debug template<typename _InputIterator> unordered_map(_InputIterator __first, _InputIterator __last, + const allocator_type& __a) + : unordered_map(__first, __last, 0, hasher(), key_equal(), __a) + { } + + template<typename _InputIterator> + unordered_map(_InputIterator __first, _InputIterator __last, size_type __n, const allocator_type& __a) : unordered_map(__first, __last, __n, hasher(), key_equal(), __a) @@ -189,6 +195,11 @@ namespace __debug { } unordered_map(initializer_list<value_type> __l, + const allocator_type& __a) + : unordered_map(__l, 0, hasher(), key_equal(), __a) + { } + + unordered_map(initializer_list<value_type> __l, size_type __n, const allocator_type& __a) : unordered_map(__l, __n, hasher(), key_equal(), __a) @@ -201,7 +212,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 +880,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>>, @@ -1053,6 +1064,12 @@ namespace __debug template<typename _InputIterator> unordered_multimap(_InputIterator __first, _InputIterator __last, + const allocator_type& __a) + : unordered_multimap(__first, __last, 0, hasher(), key_equal(), __a) + { } + + template<typename _InputIterator> + unordered_multimap(_InputIterator __first, _InputIterator __last, size_type __n, const allocator_type& __a) : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a) @@ -1066,6 +1083,11 @@ namespace __debug { } unordered_multimap(initializer_list<value_type> __l, + const allocator_type& __a) + : unordered_multimap(__l, 0, hasher(), key_equal(), __a) + { } + + unordered_multimap(initializer_list<value_type> __l, size_type __n, const allocator_type& __a) : unordered_multimap(__l, __n, hasher(), key_equal(), __a) @@ -1077,7 +1099,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 +1677,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>>, diff --git a/libstdc++-v3/include/debug/unordered_set b/libstdc++-v3/include/debug/unordered_set index 2e342cc..932600d 100644 --- a/libstdc++-v3/include/debug/unordered_set +++ b/libstdc++-v3/include/debug/unordered_set @@ -170,6 +170,12 @@ namespace __debug template<typename _InputIterator> unordered_set(_InputIterator __first, _InputIterator __last, + const allocator_type& __a) + : unordered_set(__first, __last, 0, hasher(), key_equal(), __a) + { } + + template<typename _InputIterator> + unordered_set(_InputIterator __first, _InputIterator __last, size_type __n, const allocator_type& __a) : unordered_set(__first, __last, __n, hasher(), key_equal(), __a) @@ -183,6 +189,11 @@ namespace __debug { } unordered_set(initializer_list<value_type> __l, + const allocator_type& __a) + : unordered_set(__l, 0, hasher(), key_equal(), __a) + { } + + unordered_set(initializer_list<value_type> __l, size_type __n, const allocator_type& __a) : unordered_set(__l, __n, hasher(), key_equal(), __a) @@ -194,7 +205,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, @@ -713,6 +724,17 @@ namespace __debug typename iterator_traits<_InputIterator>::value_type>, _Allocator>; + template<typename _InputIterator, typename _Allocator, + typename = _RequireInputIter<_InputIterator>, + typename = _RequireAllocator<_Allocator>> + unordered_set(_InputIterator, _InputIterator, _Allocator) + -> unordered_set<typename iterator_traits<_InputIterator>::value_type, + hash< + typename iterator_traits<_InputIterator>::value_type>, + equal_to< + typename iterator_traits<_InputIterator>::value_type>, + _Allocator>; + template<typename _InputIterator, typename _Hash, typename _Allocator, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, @@ -732,6 +754,11 @@ namespace __debug unordered_set<int>::size_type, _Allocator) -> unordered_set<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>; + template<typename _Tp, typename _Allocator, + typename = _RequireAllocator<_Allocator>> + unordered_set(initializer_list<_Tp>, _Allocator) + -> unordered_set<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>; + template<typename _Tp, typename _Hash, typename _Allocator, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>> @@ -878,6 +905,12 @@ namespace __debug template<typename _InputIterator> unordered_multiset(_InputIterator __first, _InputIterator __last, + const allocator_type& __a) + : unordered_multiset(__first, __last, 0, hasher(), key_equal(), __a) + { } + + template<typename _InputIterator> + unordered_multiset(_InputIterator __first, _InputIterator __last, size_type __n, const allocator_type& __a) : unordered_multiset(__first, __last, __n, hasher(), key_equal(), __a) @@ -891,6 +924,11 @@ namespace __debug { } unordered_multiset(initializer_list<value_type> __l, + const allocator_type& __a) + : unordered_multiset(__l, 0, hasher(), key_equal(), __a) + { } + + unordered_multiset(initializer_list<value_type> __l, size_type __n, const allocator_type& __a) : unordered_multiset(__l, __n, hasher(), key_equal(), __a) @@ -902,7 +940,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, @@ -1416,6 +1454,17 @@ namespace __debug iterator_traits<_InputIterator>::value_type>, _Allocator>; + template<typename _InputIterator, typename _Allocator, + typename = _RequireInputIter<_InputIterator>, + typename = _RequireAllocator<_Allocator>> + unordered_multiset(_InputIterator, _InputIterator, _Allocator) + -> unordered_multiset<typename iterator_traits<_InputIterator>::value_type, + hash<typename + iterator_traits<_InputIterator>::value_type>, + equal_to<typename + iterator_traits<_InputIterator>::value_type>, + _Allocator>; + template<typename _InputIterator, typename _Hash, typename _Allocator, typename = _RequireInputIter<_InputIterator>, typename = _RequireNotAllocatorOrIntegral<_Hash>, @@ -1437,6 +1486,11 @@ namespace __debug unordered_multiset<int>::size_type, _Allocator) -> unordered_multiset<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>; + template<typename _Tp, typename _Allocator, + typename = _RequireAllocator<_Allocator>> + unordered_multiset(initializer_list<_Tp>, _Allocator) + -> unordered_multiset<_Tp, hash<_Tp>, equal_to<_Tp>, _Allocator>; + template<typename _Tp, typename _Hash, typename _Allocator, typename = _RequireNotAllocatorOrIntegral<_Hash>, typename = _RequireAllocator<_Allocator>> @@ -1444,7 +1498,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 +1533,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>>, diff --git a/libstdc++-v3/include/debug/vector b/libstdc++-v3/include/debug/vector index b49766c..1b3486b 100644 --- a/libstdc++-v3/include/debug/vector +++ b/libstdc++-v3/include/debug/vector @@ -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()) |