44 #define _ALLOCATOR_H 1
48 #if __cplusplus >= 201103L
52 namespace std _GLIBCXX_VISIBILITY(default)
54 _GLIBCXX_BEGIN_NAMESPACE_VERSION
65 template<
typename _Tp>
73 typedef size_t size_type;
74 typedef ptrdiff_t difference_type;
75 typedef void* pointer;
76 typedef const void* const_pointer;
77 typedef void value_type;
79 template<
typename _Tp1>
83 #if __cplusplus >= 201103L
98 template<
typename _Tp>
102 typedef size_t size_type;
103 typedef ptrdiff_t difference_type;
104 typedef _Tp* pointer;
105 typedef const _Tp* const_pointer;
106 typedef _Tp& reference;
107 typedef const _Tp& const_reference;
108 typedef _Tp value_type;
110 template<
typename _Tp1>
114 #if __cplusplus >= 201103L
117 typedef true_type propagate_on_container_move_assignment;
120 allocator() throw() { }
122 allocator(
const allocator& __a)
throw()
123 : __allocator_base<_Tp>(__a) { }
125 template<
typename _Tp1>
126 allocator(
const allocator<_Tp1>&) throw() { }
128 ~allocator() throw() { }
133 template<
typename _T1,
typename _T2>
135 operator==(
const allocator<_T1>&,
const allocator<_T2>&)
138 template<
typename _Tp>
140 operator==(
const allocator<_Tp>&,
const allocator<_Tp>&)
143 template<
typename _T1,
typename _T2>
145 operator!=(
const allocator<_T1>&,
const allocator<_T2>&)
148 template<
typename _Tp>
150 operator!=(
const allocator<_Tp>&,
const allocator<_Tp>&)
154 template<
typename,
typename>
163 #if _GLIBCXX_EXTERN_TEMPLATE
169 #undef __allocator_base
172 template<
typename _Alloc,
bool = __is_empty(_Alloc)>
174 {
static void _S_do_it(_Alloc&, _Alloc&) { } };
176 template<
typename _Alloc>
177 struct __alloc_swap<_Alloc, false>
180 _S_do_it(_Alloc& __one, _Alloc& __two)
189 template<
typename _Alloc,
bool = __is_empty(_Alloc)>
193 _S_do_it(
const _Alloc&,
const _Alloc&)
197 template<
typename _Alloc>
198 struct __alloc_neq<_Alloc, false>
201 _S_do_it(
const _Alloc& __one,
const _Alloc& __two)
202 {
return __one != __two; }
205 #if __cplusplus >= 201103L
206 template<
typename _Tp,
bool
207 = __or_<is_copy_constructible<typename _Tp::value_type>,
208 is_nothrow_move_constructible<typename _Tp::value_type>>::value>
209 struct __shrink_to_fit_aux
210 {
static bool _S_do_it(_Tp&) {
return false; } };
212 template<
typename _Tp>
213 struct __shrink_to_fit_aux<_Tp, true>
220 _Tp(__make_move_if_noexcept_iterator(__c.begin()),
221 __make_move_if_noexcept_iterator(__c.end()),
222 __c.get_allocator()).swap(__c);
231 _GLIBCXX_END_NAMESPACE_VERSION