48#if __cplusplus >= 201103L
52 typedef _Alloc allocator_type;
53#if __cplusplus >= 201103L
61 typedef value_type& reference;
62 typedef const value_type& const_reference;
70 template<
typename _Ptr>
71 using __is_custom_pointer
72 = std::__and_<std::is_same<pointer, _Ptr>,
73 std::__not_<std::is_pointer<_Ptr>>>;
77 template<
typename _Ptr,
typename... _Args>
78 [[__gnu__::__always_inline__]]
79 static _GLIBCXX14_CONSTEXPR
80 std::__enable_if_t<__is_custom_pointer<_Ptr>::value>
81 construct(_Alloc& __a, _Ptr __p, _Args&&... __args)
90 template<
typename _Ptr>
91 [[__gnu__::__always_inline__]]
92 static _GLIBCXX14_CONSTEXPR
93 std::__enable_if_t<__is_custom_pointer<_Ptr>::value>
94 destroy(_Alloc& __a, _Ptr __p)
98 [[__gnu__::__always_inline__]]
99 static constexpr _Alloc _S_select_on_copy(
const _Alloc& __a)
102 [[__gnu__::__always_inline__]]
103 static _GLIBCXX14_CONSTEXPR
void _S_on_swap(_Alloc& __a, _Alloc& __b)
104 { std::__alloc_on_swap(__a, __b); }
106 [[__gnu__::__always_inline__]]
107 static constexpr bool _S_propagate_on_copy_assign()
108 {
return _Base_type::propagate_on_container_copy_assignment::value; }
110 [[__gnu__::__always_inline__]]
111 static constexpr bool _S_propagate_on_move_assign()
112 {
return _Base_type::propagate_on_container_move_assignment::value; }
114 [[__gnu__::__always_inline__]]
115 static constexpr bool _S_propagate_on_swap()
116 {
return _Base_type::propagate_on_container_swap::value; }
118 [[__gnu__::__always_inline__]]
119 static constexpr bool _S_always_equal()
120 {
return _Base_type::is_always_equal::value; }
122 __attribute__((__always_inline__))
123 static constexpr bool _S_nothrow_move()
124 {
return _S_propagate_on_move_assign() || _S_always_equal(); }
126 template<
typename _Tp>
128 {
typedef typename _Base_type::template rebind_alloc<_Tp>
other; };
131 typedef typename _Alloc::pointer pointer;
132 typedef typename _Alloc::const_pointer const_pointer;
133 typedef typename _Alloc::value_type value_type;
134 typedef typename _Alloc::reference reference;
135 typedef typename _Alloc::const_reference const_reference;
136 typedef typename _Alloc::size_type size_type;
137 typedef typename _Alloc::difference_type difference_type;
139 __attribute__((__always_inline__)) _GLIBCXX_NODISCARD
141 allocate(_Alloc& __a, size_type __n)
142 {
return __a.allocate(__n); }
144 template<
typename _H
int>
145 __attribute__((__always_inline__)) _GLIBCXX_NODISCARD
147 allocate(_Alloc& __a, size_type __n, _Hint __hint)
148 {
return __a.allocate(__n, __hint); }
150 __attribute__((__always_inline__))
151 static void deallocate(_Alloc& __a, pointer __p, size_type __n)
152 { __a.deallocate(__p, __n); }
154 template<
typename _Tp>
155 __attribute__((__always_inline__))
156 static void construct(_Alloc& __a, pointer __p,
const _Tp& __arg)
157 { __a.construct(__p, __arg); }
159 __attribute__((__always_inline__))
160 static void destroy(_Alloc& __a, pointer __p)
161 { __a.destroy(__p); }
163 __attribute__((__always_inline__))
164 static size_type
max_size(
const _Alloc& __a)
165 {
return __a.max_size(); }
167 __attribute__((__always_inline__))
168 static const _Alloc& _S_select_on_copy(
const _Alloc& __a) {
return __a; }
170 __attribute__((__always_inline__))
171 static void _S_on_swap(_Alloc& __a, _Alloc& __b)
175 std::__alloc_swap<_Alloc>::_S_do_it(__a, __b);
178 template<
typename _Tp>
180 {
typedef typename _Alloc::template rebind<_Tp>::other
other; };