45 #define _ALLOCATOR_H 1 
   50 namespace std _GLIBCXX_VISIBILITY(default)
 
   52 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
   63   template<
typename _Tp>
 
   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>
 
   88   template<
typename _Tp>
 
   89     class allocator: 
public __glibcxx_base_allocator<_Tp>
 
   92       typedef size_t     size_type;
 
   93       typedef ptrdiff_t  difference_type;
 
   95       typedef const _Tp* const_pointer;
 
   96       typedef _Tp&       reference;
 
   97       typedef const _Tp& const_reference;
 
   98       typedef _Tp        value_type;
 
  100       template<
typename _Tp1>
 
  104       allocator() throw() { }
 
  106       allocator(
const allocator& __a) 
throw()
 
  107       : __glibcxx_base_allocator<_Tp>(__a) { }
 
  109       template<
typename _Tp1>
 
  110         allocator(
const allocator<_Tp1>&) throw() { }
 
  112       ~allocator() throw() { }
 
  117   template<
typename _T1, 
typename _T2>
 
  119     operator==(
const allocator<_T1>&, 
const allocator<_T2>&)
 
  122   template<
typename _Tp>
 
  124     operator==(
const allocator<_Tp>&, 
const allocator<_Tp>&)
 
  127   template<
typename _T1, 
typename _T2>
 
  129     operator!=(
const allocator<_T1>&, 
const allocator<_T2>&)
 
  132   template<
typename _Tp>
 
  134     operator!=(
const allocator<_Tp>&, 
const allocator<_Tp>&)
 
  143 #if _GLIBCXX_EXTERN_TEMPLATE 
  144   extern template class allocator<char>;
 
  145   extern template class allocator<wchar_t>;
 
  149 #undef __glibcxx_base_allocator 
  152   template<
typename _Alloc, 
bool = __is_empty(_Alloc)>
 
  154     { 
static void _S_do_it(_Alloc&, _Alloc&) { } };
 
  156   template<
typename _Alloc>
 
  157     struct __alloc_swap<_Alloc, false>
 
  160       _S_do_it(_Alloc& __one, _Alloc& __two)
 
  169   template<
typename _Alloc, 
bool = __is_empty(_Alloc)>
 
  173       _S_do_it(
const _Alloc&, 
const _Alloc&)
 
  177   template<
typename _Alloc>
 
  178     struct __alloc_neq<_Alloc, false>
 
  181       _S_do_it(
const _Alloc& __one, 
const _Alloc& __two)
 
  182       { 
return __one != __two; }
 
  185 #ifdef __GXX_EXPERIMENTAL_CXX0X__ 
  186   template<
typename _Tp, 
bool 
  187     = __or_<is_copy_constructible<typename _Tp::value_type>,
 
  188             is_nothrow_move_constructible<typename _Tp::value_type>>::value>
 
  189     struct __shrink_to_fit_aux
 
  190     { 
static bool _S_do_it(_Tp&) { 
return false; } };
 
  192   template<
typename _Tp>
 
  193     struct __shrink_to_fit_aux<_Tp, true>
 
  200         _Tp(__make_move_if_noexcept_iterator(__c.begin()),
 
  201         __make_move_if_noexcept_iterator(__c.end()),
 
  202         __c.get_allocator()).swap(__c);
 
  211   template<
typename, 
typename>
 
  215 _GLIBCXX_END_NAMESPACE_VERSION
 
The standard allocator, as per [20.4].