45 #define _ALLOCATOR_H 1
50 _GLIBCXX_BEGIN_NAMESPACE(
std)
59 template<typename _Tp>
67 typedef size_t size_type;
68 typedef ptrdiff_t difference_type;
69 typedef void* pointer;
70 typedef const void* const_pointer;
71 typedef void value_type;
73 template<
typename _Tp1>
85 template<
typename _Tp>
86 class allocator:
public __glibcxx_base_allocator<_Tp>
89 typedef size_t size_type;
90 typedef ptrdiff_t difference_type;
92 typedef const _Tp* const_pointer;
93 typedef _Tp& reference;
94 typedef const _Tp& const_reference;
95 typedef _Tp value_type;
97 template<
typename _Tp1>
101 allocator() throw() { }
103 allocator(
const allocator& __a)
throw()
104 : __glibcxx_base_allocator<_Tp>(__a) { }
106 template<
typename _Tp1>
107 allocator(
const allocator<_Tp1>&) throw() { }
109 ~allocator() throw() { }
114 template<
typename _T1,
typename _T2>
116 operator==(
const allocator<_T1>&,
const allocator<_T2>&)
119 template<
typename _Tp>
121 operator==(
const allocator<_Tp>&,
const allocator<_Tp>&)
124 template<
typename _T1,
typename _T2>
126 operator!=(
const allocator<_T1>&,
const allocator<_T2>&)
129 template<
typename _Tp>
131 operator!=(
const allocator<_Tp>&,
const allocator<_Tp>&)
137 #if _GLIBCXX_EXTERN_TEMPLATE
138 extern template class allocator<char>;
139 extern template class allocator<wchar_t>;
143 #undef __glibcxx_base_allocator
146 template<
typename _Alloc,
bool = __is_empty(_Alloc)>
148 {
static void _S_do_it(_Alloc&, _Alloc&) { } };
150 template<
typename _Alloc>
151 struct __alloc_swap<_Alloc, false>
154 _S_do_it(_Alloc& __one, _Alloc& __two)
163 template<
typename _Alloc,
bool = __is_empty(_Alloc)>
167 _S_do_it(
const _Alloc&,
const _Alloc&)
171 template<
typename _Alloc>
172 struct __alloc_neq<_Alloc, false>
175 _S_do_it(
const _Alloc& __one,
const _Alloc& __two)
176 {
return __one != __two; }
179 _GLIBCXX_END_NAMESPACE
The "standard" allocator, as per [20.4].Further details: http://gcc.gnu.org/onlinedocs/libstdc++/manu...
ISO C++ entities toplevel namespace is std.