44 #define _ALLOCATOR_H 1 48 #if __cplusplus >= 201103L 52 #define __cpp_lib_incomplete_container_elements 201505 53 #if __cplusplus >= 201103L 54 # define __cpp_lib_allocator_is_always_equal 201411 57 namespace std _GLIBCXX_VISIBILITY(default)
59 _GLIBCXX_BEGIN_NAMESPACE_VERSION
71 typedef size_t size_type;
72 typedef ptrdiff_t difference_type;
73 typedef void* pointer;
74 typedef const void* const_pointer;
75 typedef void value_type;
77 template<
typename _Tp1>
81 #if __cplusplus >= 201103L 88 template<
typename _Up,
typename... _Args>
90 construct(_Up* __p, _Args&&... __args)
91 { ::new((
void *)__p) _Up(std::forward<_Args>(__args)...); }
93 template<
typename _Up>
95 destroy(_Up* __p) { __p->~_Up(); }
107 template<
typename _Tp>
111 typedef size_t size_type;
112 typedef ptrdiff_t difference_type;
113 typedef _Tp* pointer;
114 typedef const _Tp* const_pointer;
115 typedef _Tp& reference;
116 typedef const _Tp& const_reference;
117 typedef _Tp value_type;
119 template<
typename _Tp1>
123 #if __cplusplus >= 201103L 136 template<
typename _Tp1>
144 template<
typename _T1,
typename _T2>
147 _GLIBCXX_USE_NOEXCEPT
150 template<
typename _Tp>
153 _GLIBCXX_USE_NOEXCEPT
156 template<
typename _T1,
typename _T2>
159 _GLIBCXX_USE_NOEXCEPT
162 template<
typename _Tp>
165 _GLIBCXX_USE_NOEXCEPT
172 #if _GLIBCXX_EXTERN_TEMPLATE 178 #undef __allocator_base 181 template<
typename _Alloc,
bool = __is_empty(_Alloc)>
183 {
static void _S_do_it(_Alloc&, _Alloc&) _GLIBCXX_NOEXCEPT { } };
185 template<
typename _Alloc>
186 struct __alloc_swap<_Alloc, false>
189 _S_do_it(_Alloc& __one, _Alloc& __two) _GLIBCXX_NOEXCEPT
198 template<
typename _Alloc,
bool = __is_empty(_Alloc)>
202 _S_do_it(
const _Alloc&,
const _Alloc&)
206 template<
typename _Alloc>
207 struct __alloc_neq<_Alloc, false>
210 _S_do_it(
const _Alloc& __one,
const _Alloc& __two)
211 {
return __one != __two; }
214 #if __cplusplus >= 201103L 215 template<
typename _Tp,
bool 216 = __or_<is_copy_constructible<typename _Tp::value_type>,
217 is_nothrow_move_constructible<typename _Tp::value_type>>::value>
218 struct __shrink_to_fit_aux
219 {
static bool _S_do_it(_Tp&) noexcept {
return false; } };
221 template<
typename _Tp>
222 struct __shrink_to_fit_aux<_Tp, true>
225 _S_do_it(_Tp& __c) noexcept
230 _Tp(__make_move_if_noexcept_iterator(__c.begin()),
231 __make_move_if_noexcept_iterator(__c.end()),
232 __c.get_allocator()).swap(__c);
244 _GLIBCXX_END_NAMESPACE_VERSION
The standard allocator, as per [20.4].
ISO C++ entities toplevel namespace is std.
An allocator that uses global new, as per [20.4].This is precisely the allocator defined in the C++ S...