44 #define _ALLOCATOR_H 1 48 #if __cplusplus >= 201103L 52 #define __cpp_lib_incomplete_container_elements 201505 54 namespace std _GLIBCXX_VISIBILITY(default)
56 _GLIBCXX_BEGIN_NAMESPACE_VERSION
68 typedef size_t size_type;
69 typedef ptrdiff_t difference_type;
70 typedef void* pointer;
71 typedef const void* const_pointer;
72 typedef void value_type;
74 template<
typename _Tp1>
78 #if __cplusplus >= 201103L 83 #define __cpp_lib_allocator_is_always_equal 201411 96 template<
typename _Tp>
100 typedef size_t size_type;
101 typedef ptrdiff_t difference_type;
102 typedef _Tp* pointer;
103 typedef const _Tp* const_pointer;
104 typedef _Tp& reference;
105 typedef const _Tp& const_reference;
106 typedef _Tp value_type;
108 template<
typename _Tp1>
112 #if __cplusplus >= 201103L 123 template<
typename _Tp1>
131 template<
typename _T1,
typename _T2>
134 _GLIBCXX_USE_NOEXCEPT
137 template<
typename _Tp>
140 _GLIBCXX_USE_NOEXCEPT
143 template<
typename _T1,
typename _T2>
146 _GLIBCXX_USE_NOEXCEPT
149 template<
typename _Tp>
152 _GLIBCXX_USE_NOEXCEPT
159 #if _GLIBCXX_EXTERN_TEMPLATE 165 #undef __allocator_base 168 template<
typename _Alloc,
bool = __is_empty(_Alloc)>
170 {
static void _S_do_it(_Alloc&, _Alloc&) _GLIBCXX_NOEXCEPT { } };
172 template<
typename _Alloc>
173 struct __alloc_swap<_Alloc, false>
176 _S_do_it(_Alloc& __one, _Alloc& __two) _GLIBCXX_NOEXCEPT
185 template<
typename _Alloc,
bool = __is_empty(_Alloc)>
189 _S_do_it(
const _Alloc&,
const _Alloc&)
193 template<
typename _Alloc>
194 struct __alloc_neq<_Alloc, false>
197 _S_do_it(
const _Alloc& __one,
const _Alloc& __two)
198 {
return __one != __two; }
201 #if __cplusplus >= 201103L 202 template<
typename _Tp,
bool 203 = __or_<is_copy_constructible<typename _Tp::value_type>,
204 is_nothrow_move_constructible<typename _Tp::value_type>>::value>
205 struct __shrink_to_fit_aux
206 {
static bool _S_do_it(_Tp&) noexcept {
return false; } };
208 template<
typename _Tp>
209 struct __shrink_to_fit_aux<_Tp, true>
212 _S_do_it(_Tp& __c) noexcept
217 _Tp(__make_move_if_noexcept_iterator(__c.begin()),
218 __make_move_if_noexcept_iterator(__c.end()),
219 __c.get_allocator()).swap(__c);
231 _GLIBCXX_END_NAMESPACE_VERSION
The standard allocator, as per [20.4].
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.