44 #define _ALLOCATOR_H 1
46 #include <bits/c++allocator.h>
48 #if __cplusplus >= 201103L
49 #include <type_traits>
54 _GLIBCXX_BEGIN_NAMESPACE_VERSION
66 typedef size_t size_type;
68 typedef void* pointer;
69 typedef const void* const_pointer;
70 typedef void value_type;
72 template<
typename _Tp1>
74 {
typedef allocator<_Tp1> other; };
76 #if __cplusplus >= 201103L
79 typedef true_type propagate_on_container_move_assignment;
91 template<
typename _Tp>
92 class allocator:
public __allocator_base<_Tp>
95 typedef size_t size_type;
98 typedef const _Tp* const_pointer;
99 typedef _Tp& reference;
100 typedef const _Tp& const_reference;
101 typedef _Tp value_type;
103 template<
typename _Tp1>
105 {
typedef allocator<_Tp1> other; };
107 #if __cplusplus >= 201103L
110 typedef true_type propagate_on_container_move_assignment;
113 allocator() throw() { }
115 allocator(
const allocator& __a)
throw()
116 : __allocator_base<_Tp>(__a) { }
118 template<
typename _Tp1>
119 allocator(
const allocator<_Tp1>&) throw() { }
121 ~allocator() throw() { }
126 template<
typename _T1,
typename _T2>
128 operator==(
const allocator<_T1>&,
const allocator<_T2>&)
131 template<
typename _Tp>
133 operator==(
const allocator<_Tp>&,
const allocator<_Tp>&)
136 template<
typename _T1,
typename _T2>
138 operator!=(
const allocator<_T1>&,
const allocator<_T2>&)
141 template<
typename _Tp>
143 operator!=(
const allocator<_Tp>&,
const allocator<_Tp>&)
150 #if _GLIBCXX_EXTERN_TEMPLATE
151 extern template class allocator<char>;
152 extern template class allocator<wchar_t>;
156 #undef __allocator_base
159 template<
typename _Alloc,
bool = __is_empty(_Alloc)>
161 {
static void _S_do_it(_Alloc&, _Alloc&) { } };
163 template<
typename _Alloc>
164 struct __alloc_swap<_Alloc, false>
167 _S_do_it(_Alloc& __one, _Alloc& __two)
176 template<
typename _Alloc,
bool = __is_empty(_Alloc)>
180 _S_do_it(
const _Alloc&,
const _Alloc&)
184 template<
typename _Alloc>
185 struct __alloc_neq<_Alloc, false>
188 _S_do_it(
const _Alloc& __one,
const _Alloc& __two)
189 {
return __one != __two; }
192 #if __cplusplus >= 201103L
193 template<
typename _Tp,
bool
194 = __or_<is_copy_constructible<typename _Tp::value_type>,
195 is_nothrow_move_constructible<typename _Tp::value_type>>::value>
196 struct __shrink_to_fit_aux
197 {
static bool _S_do_it(_Tp&) {
return false; } };
199 template<
typename _Tp>
200 struct __shrink_to_fit_aux<_Tp,
true>
207 _Tp(__make_move_if_noexcept_iterator(__c.begin()),
208 __make_move_if_noexcept_iterator(__c.end()),
209 __c.get_allocator()).
swap(__c);
218 _GLIBCXX_END_NAMESPACE_VERSION
bool operator==(const exception_ptr &, const exception_ptr &) _GLIBCXX_USE_NOEXCEPT __attribute__((__pure__))
#define __try
Definition: exception_defines.h:35
#define true
Definition: stdbool.h:34
namespace std _GLIBCXX_VISIBILITY(default)
Definition: auto_ptr.h:36
bool operator!=(const exception_ptr &, const exception_ptr &) _GLIBCXX_USE_NOEXCEPT __attribute__((__pure__))
std::tr1::integral_constant< int, 1 > true_type
Definition: type_utils.hpp:70
#define __catch(X)
Definition: exception_defines.h:36
__PTRDIFF_TYPE__ ptrdiff_t
Definition: stddef.h:147
void swap(exception_ptr &__lhs, exception_ptr &__rhs)
Definition: exception_ptr.h:160