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 #define __cpp_lib_allocator_is_always_equal 201411
94 template<
typename _Tp>
98 typedef size_t size_type;
99 typedef ptrdiff_t difference_type;
100 typedef _Tp* pointer;
101 typedef const _Tp* const_pointer;
102 typedef _Tp& reference;
103 typedef const _Tp& const_reference;
104 typedef _Tp value_type;
106 template<
typename _Tp1>
110 #if __cplusplus >= 201103L
121 template<
typename _Tp1>
129 template<
typename _T1,
typename _T2>
132 _GLIBCXX_USE_NOEXCEPT
135 template<
typename _Tp>
137 operator==(
const allocator<_Tp>&,
const allocator<_Tp>&)
138 _GLIBCXX_USE_NOEXCEPT
141 template<
typename _T1,
typename _T2>
143 operator!=(
const allocator<_T1>&,
const allocator<_T2>&)
144 _GLIBCXX_USE_NOEXCEPT
147 template<
typename _Tp>
149 operator!=(
const allocator<_Tp>&,
const allocator<_Tp>&)
150 _GLIBCXX_USE_NOEXCEPT
157 #if _GLIBCXX_EXTERN_TEMPLATE
158 extern template class allocator<char>;
159 extern template class allocator<wchar_t>;
163 #undef __allocator_base
166 template<
typename _Alloc,
bool = __is_empty(_Alloc)>
168 {
static void _S_do_it(_Alloc&, _Alloc&) _GLIBCXX_NOEXCEPT { } };
170 template<
typename _Alloc>
171 struct __alloc_swap<_Alloc, false>
174 _S_do_it(_Alloc& __one, _Alloc& __two) _GLIBCXX_NOEXCEPT
183 template<
typename _Alloc,
bool = __is_empty(_Alloc)>
187 _S_do_it(
const _Alloc&,
const _Alloc&)
191 template<
typename _Alloc>
192 struct __alloc_neq<_Alloc, false>
195 _S_do_it(
const _Alloc& __one,
const _Alloc& __two)
196 {
return __one != __two; }
199 #if __cplusplus >= 201103L
200 template<
typename _Tp,
bool
201 = __or_<is_copy_constructible<typename _Tp::value_type>,
202 is_nothrow_move_constructible<typename _Tp::value_type>>::value>
203 struct __shrink_to_fit_aux
204 {
static bool _S_do_it(_Tp&) noexcept {
return false; } };
206 template<
typename _Tp>
207 struct __shrink_to_fit_aux<_Tp, true>
210 _S_do_it(_Tp& __c) noexcept
215 _Tp(__make_move_if_noexcept_iterator(__c.begin()),
216 __make_move_if_noexcept_iterator(__c.end()),
217 __c.get_allocator()).
swap(__c);
229 _GLIBCXX_END_NAMESPACE_VERSION
An allocator that uses global new, as per [20.4].This is precisely the allocator defined in the C++ S...
The standard allocator, as per [20.4].
void swap(basic_filebuf< _CharT, _Traits > &__x, basic_filebuf< _CharT, _Traits > &__y)
Swap specialization for filebufs.