summaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/scoped_allocator
diff options
context:
space:
mode:
authormikhnenko <[email protected]>2025-01-20 01:34:08 +0300
committermikhnenko <[email protected]>2025-01-20 01:51:09 +0300
commit2ab2ef14e493133a483a7210a0133c1d8918eee2 (patch)
treeb25a613d75999386160a0ffe41a4f69282a592b3 /contrib/libs/cxxsupp/libcxx/include/scoped_allocator
parent11def371ff569cef09101fa40c00e6180c3885bc (diff)
Update libcxx to 5 Mar 2024 80f9458cf30d13eef21b09042ea590945c5e64db
commit_hash:c45aa2ed98c2a01fa86b69bac97f40a32bd68ae2
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/scoped_allocator')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/scoped_allocator26
1 files changed, 12 insertions, 14 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/scoped_allocator b/contrib/libs/cxxsupp/libcxx/include/scoped_allocator
index 6078906e922..c53261025be 100644
--- a/contrib/libs/cxxsupp/libcxx/include/scoped_allocator
+++ b/contrib/libs/cxxsupp/libcxx/include/scoped_allocator
@@ -109,7 +109,6 @@ template <class OuterA1, class OuterA2, class... InnerAllocs>
*/
-#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
#include <__memory/allocator_traits.h>
#include <__memory/uses_allocator_construction.h>
@@ -334,12 +333,12 @@ struct __outermost<_Alloc, true> {
template <class _OuterAlloc, class... _InnerAllocs>
class _LIBCPP_TEMPLATE_VIS scoped_allocator_adaptor<_OuterAlloc, _InnerAllocs...>
: public __scoped_allocator_storage<_OuterAlloc, _InnerAllocs...> {
- typedef __scoped_allocator_storage<_OuterAlloc, _InnerAllocs...> base;
+ typedef __scoped_allocator_storage<_OuterAlloc, _InnerAllocs...> _Base;
typedef allocator_traits<_OuterAlloc> _OuterTraits;
public:
typedef _OuterAlloc outer_allocator_type;
- typedef typename base::inner_allocator_type inner_allocator_type;
+ typedef typename _Base::inner_allocator_type inner_allocator_type;
typedef typename _OuterTraits::size_type size_type;
typedef typename _OuterTraits::difference_type difference_type;
typedef typename _OuterTraits::pointer pointer;
@@ -365,29 +364,29 @@ public:
template <class _OuterA2, __enable_if_t<is_constructible<outer_allocator_type, _OuterA2>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
scoped_allocator_adaptor(_OuterA2&& __outer_alloc, const _InnerAllocs&... __inner_allocs) _NOEXCEPT
- : base(std::forward<_OuterA2>(__outer_alloc), __inner_allocs...) {}
+ : _Base(std::forward<_OuterA2>(__outer_alloc), __inner_allocs...) {}
// scoped_allocator_adaptor(const scoped_allocator_adaptor& __other) = default;
template <class _OuterA2, __enable_if_t<is_constructible<outer_allocator_type, const _OuterA2&>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
scoped_allocator_adaptor(const scoped_allocator_adaptor<_OuterA2, _InnerAllocs...>& __other) _NOEXCEPT
- : base(__other) {}
+ : _Base(__other) {}
template <class _OuterA2, __enable_if_t<is_constructible<outer_allocator_type, _OuterA2>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI
scoped_allocator_adaptor(scoped_allocator_adaptor<_OuterA2, _InnerAllocs...>&& __other) _NOEXCEPT
- : base(std::move(__other)) {}
+ : _Base(std::move(__other)) {}
// scoped_allocator_adaptor& operator=(const scoped_allocator_adaptor&) = default;
// scoped_allocator_adaptor& operator=(scoped_allocator_adaptor&&) = default;
// ~scoped_allocator_adaptor() = default;
- _LIBCPP_HIDE_FROM_ABI inner_allocator_type& inner_allocator() _NOEXCEPT { return base::inner_allocator(); }
+ _LIBCPP_HIDE_FROM_ABI inner_allocator_type& inner_allocator() _NOEXCEPT { return _Base::inner_allocator(); }
_LIBCPP_HIDE_FROM_ABI const inner_allocator_type& inner_allocator() const _NOEXCEPT {
- return base::inner_allocator();
+ return _Base::inner_allocator();
}
- _LIBCPP_HIDE_FROM_ABI outer_allocator_type& outer_allocator() _NOEXCEPT { return base::outer_allocator(); }
+ _LIBCPP_HIDE_FROM_ABI outer_allocator_type& outer_allocator() _NOEXCEPT { return _Base::outer_allocator(); }
_LIBCPP_HIDE_FROM_ABI const outer_allocator_type& outer_allocator() const _NOEXCEPT {
- return base::outer_allocator();
+ return _Base::outer_allocator();
}
_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI pointer allocate(size_type __n) {
@@ -472,13 +471,12 @@ public:
}
_LIBCPP_HIDE_FROM_ABI scoped_allocator_adaptor select_on_container_copy_construction() const _NOEXCEPT {
- return base::select_on_container_copy_construction();
+ return _Base::select_on_container_copy_construction();
}
private:
- template <class _OuterA2, __enable_if_t<is_constructible<outer_allocator_type, _OuterA2>::value, int> = 0>
- _LIBCPP_HIDE_FROM_ABI scoped_allocator_adaptor(_OuterA2&& __o, const inner_allocator_type& __i) _NOEXCEPT
- : base(std::forward<_OuterA2>(__o), __i) {}
+ _LIBCPP_HIDE_FROM_ABI explicit scoped_allocator_adaptor(
+ outer_allocator_type&& __o, inner_allocator_type&& __i) _NOEXCEPT : _Base(std::move(__o), std::move(__i)) {}
template <class _Tp, class... _Args>
_LIBCPP_HIDE_FROM_ABI void __construct(integral_constant<int, 0>, _Tp* __p, _Args&&... __args) {