44 #define _ALLOCATOR_H 1 48 #if __cplusplus >= 201103L 52 namespace std _GLIBCXX_VISIBILITY(default)
54 _GLIBCXX_BEGIN_NAMESPACE_VERSION
66 typedef size_t size_type;
67 typedef ptrdiff_t difference_type;
68 typedef void* pointer;
69 typedef const void* const_pointer;
70 typedef void value_type;
72 template<
typename _Tp1>
76 #if __cplusplus >= 201103L 81 template<
typename _Up,
typename... _Args>
83 construct(_Up* __p, _Args&&... __args)
84 { ::new((
void *)__p) _Up(std::forward<_Args>(__args)...); }
86 template<
typename _Up>
88 destroy(_Up* __p) { __p->~_Up(); }
100 template<
typename _Tp>
104 typedef size_t size_type;
105 typedef ptrdiff_t difference_type;
106 typedef _Tp* pointer;
107 typedef const _Tp* const_pointer;
108 typedef _Tp& reference;
109 typedef const _Tp& const_reference;
110 typedef _Tp value_type;
112 template<
typename _Tp1>
116 #if __cplusplus >= 201103L 127 template<
typename _Tp1>
135 template<
typename _T1,
typename _T2>
138 _GLIBCXX_USE_NOEXCEPT
141 template<
typename _Tp>
144 _GLIBCXX_USE_NOEXCEPT
147 template<
typename _T1,
typename _T2>
150 _GLIBCXX_USE_NOEXCEPT
153 template<
typename _Tp>
156 _GLIBCXX_USE_NOEXCEPT
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&) _GLIBCXX_NOEXCEPT { } };
176 template<
typename _Alloc>
177 struct __alloc_swap<_Alloc, false>
180 _S_do_it(_Alloc& __one, _Alloc& __two) _GLIBCXX_NOEXCEPT
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&) noexcept {
return false; } };
212 template<
typename _Tp>
213 struct __shrink_to_fit_aux<_Tp, true>
216 _S_do_it(_Tp& __c) noexcept
221 _Tp(__make_move_if_noexcept_iterator(__c.begin()),
222 __make_move_if_noexcept_iterator(__c.end()),
223 __c.get_allocator()).swap(__c);
235 _GLIBCXX_END_NAMESPACE_VERSION
An allocator that uses global new, as per [20.4].This is precisely the allocator defined in the C++ S...
ISO C++ entities toplevel namespace is std.
The standard allocator, as per [20.4].