STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Static Public Member Functions | List of all members
allocator_traits< _Alloc > Struct Template Reference

Public Types

typedef _Alloc allocator_type
 
typedef _Alloc::value_type value_type
 
typedef _Get_pointer_type< _Alloc >::type pointer
 
typedef _Get_const_pointer_type< _Alloc >::type const_pointer
 
typedef _Get_void_pointer_type< _Alloc >::type void_pointer
 
typedef _Get_const_void_pointer_type< _Alloc >::type const_void_pointer
 
typedef _Get_size_type< _Alloc >::type size_type
 
typedef _Get_difference_type< _Alloc >::type difference_type
 
typedef _Get_propagate_on_container_copy< _Alloc >::type propagate_on_container_copy_assignment
 
typedef _Get_propagate_on_container_move< _Alloc >::type propagate_on_container_move_assignment
 
typedef _Get_propagate_on_container_swap< _Alloc >::type propagate_on_container_swap
 
typedef _Get_is_always_equal< _Alloc >::type is_always_equal
 
template<class _Other >
using rebind_alloc = typename _Get_rebind_type< _Alloc, _Other >::type
 
template<class _Other >
using rebind_traits = allocator_traits< rebind_alloc< _Other > >
 

Static Public Member Functions

static _DECLSPEC_ALLOCATOR pointer allocate (_Alloc &_Al, size_type _Count)
 
static _DECLSPEC_ALLOCATOR pointer allocate (_Alloc &_Al, size_type _Count, const_void_pointer _Hint)
 
static void deallocate (_Alloc &_Al, pointer _Ptr, size_type _Count)
 
template<class _Ty , class... _Types>
static void _Construct1 (true_type, _Alloc &, _Ty *_Ptr, _Types &&..._Args)
 
template<class _Ty , class... _Types>
static void _Construct1 (false_type, _Alloc &_Al, _Ty *_Ptr, _Types &&..._Args)
 
template<class _Ty , class... _Types>
static void construct (_Alloc &_Al, _Ty *_Ptr, _Types &&..._Args)
 
template<class _Ty >
static void _Destroy1 (_Alloc &, _Ty *_Ptr, true_type)
 
template<class _Ty >
static void _Destroy1 (_Alloc &_Al, _Ty *_Ptr, false_type)
 
template<class _Ty >
static void destroy (_Alloc &_Al, _Ty *_Ptr)
 
static size_type max_size (const _Alloc &_Al) _NOEXCEPT
 
static _Alloc select_on_container_copy_construction (const _Alloc &_Al)
 

Member Typedef Documentation

template<class _Alloc >
typedef _Alloc allocator_traits< _Alloc >::allocator_type
template<class _Alloc >
typedef _Get_const_pointer_type<_Alloc>::type allocator_traits< _Alloc >::const_pointer
template<class _Alloc >
typedef _Get_const_void_pointer_type<_Alloc>::type allocator_traits< _Alloc >::const_void_pointer
template<class _Alloc >
typedef _Get_difference_type<_Alloc>::type allocator_traits< _Alloc >::difference_type
template<class _Alloc >
typedef _Get_is_always_equal<_Alloc>::type allocator_traits< _Alloc >::is_always_equal
template<class _Alloc >
typedef _Get_pointer_type<_Alloc>::type allocator_traits< _Alloc >::pointer
template<class _Alloc >
typedef _Get_propagate_on_container_copy<_Alloc>::type allocator_traits< _Alloc >::propagate_on_container_copy_assignment
template<class _Alloc >
typedef _Get_propagate_on_container_move<_Alloc>::type allocator_traits< _Alloc >::propagate_on_container_move_assignment
template<class _Alloc >
typedef _Get_propagate_on_container_swap<_Alloc>::type allocator_traits< _Alloc >::propagate_on_container_swap
template<class _Alloc >
template<class _Other >
using allocator_traits< _Alloc >::rebind_alloc = typename _Get_rebind_type<_Alloc, _Other>::type
template<class _Alloc >
template<class _Other >
using allocator_traits< _Alloc >::rebind_traits = allocator_traits<rebind_alloc<_Other> >
template<class _Alloc >
typedef _Get_size_type<_Alloc>::type allocator_traits< _Alloc >::size_type
template<class _Alloc >
typedef _Alloc::value_type allocator_traits< _Alloc >::value_type
template<class _Alloc >
typedef _Get_void_pointer_type<_Alloc>::type allocator_traits< _Alloc >::void_pointer

Member Function Documentation

template<class _Alloc >
template<class _Ty , class... _Types>
static void allocator_traits< _Alloc >::_Construct1 ( true_type  ,
_Alloc &  ,
_Ty *  _Ptr,
_Types &&...  _Args 
)
inlinestatic
606  { // construct _Ty(_Types...) at _Ptr, default version
607  ::new (static_cast<void *>(_Ptr))
608  _Ty(_STD forward<_Types>(_Args)...);
609  }
constexpr _Ty && forward(typename remove_reference< _Ty >::type &_Arg) _NOEXCEPT
Definition: type_traits:1273
template<class _Alloc >
template<class _Ty , class... _Types>
static void allocator_traits< _Alloc >::_Construct1 ( false_type  ,
_Alloc &  _Al,
_Ty *  _Ptr,
_Types &&...  _Args 
)
inlinestatic
615  { // construct _Ty(_Types...) at _Ptr, allocator-supplied version
616  _Al.construct(_Ptr, _STD forward<_Types>(_Args)...);
617  }
template<class _Alloc >
template<class _Ty >
static void allocator_traits< _Alloc >::_Destroy1 ( _Alloc &  ,
_Ty *  _Ptr,
true_type   
)
inlinestatic
630  { // destroy object at _Ptr, default version
631  _Ptr->~_Ty();
632  }
template<class _Alloc >
template<class _Ty >
static void allocator_traits< _Alloc >::_Destroy1 ( _Alloc &  _Al,
_Ty *  _Ptr,
false_type   
)
inlinestatic
636  { // destroy object at _Ptr, allocator-supplied version
637  _Al.destroy(_Ptr);
638  }
template<class _Alloc >
static _DECLSPEC_ALLOCATOR pointer allocator_traits< _Alloc >::allocate ( _Alloc &  _Al,
size_type  _Count 
)
inlinestatic
586  { // allocate array of _Count elements
587  return (_Al.allocate(_Count));
588  }
unsigned int _Count
Definition: xcomplex:668
template<class _Alloc >
static _DECLSPEC_ALLOCATOR pointer allocator_traits< _Alloc >::allocate ( _Alloc &  _Al,
size_type  _Count,
const_void_pointer  _Hint 
)
inlinestatic
592  { // allocate array of _Count elements, with hint
593  return (_Alloc_allocate::_Fn(0, _Al, _Count, _Hint));
594  }
unsigned int _Count
Definition: xcomplex:668
static auto _Fn(int, _Alloc &_Al, _Size_type _Count, _Const_void_pointer _Hint) -> decltype(_Al.allocate(_Count, _Hint))
Definition: xmemory0:422
template<class _Alloc >
template<class _Ty , class... _Types>
static void allocator_traits< _Alloc >::construct ( _Alloc &  _Al,
_Ty *  _Ptr,
_Types &&...  _Args 
)
inlinestatic
623  { // construct _Ty(_Types...) at _Ptr
625  _Al, _Ptr, _STD forward<_Types>(_Args)...);
626  }
static void _Construct1(true_type, _Alloc &, _Ty *_Ptr, _Types &&..._Args)
Definition: xmemory0:604
typename _Unwrap_alloc< _Alloc >::type _Unwrap_alloc_t
Definition: xmemory0:397
typename _Uses_default_construct< _Alloc, _Ptr, _Args...>::type _Uses_default_construct_t
Definition: xmemory0:476
template<class _Alloc >
static void allocator_traits< _Alloc >::deallocate ( _Alloc &  _Al,
pointer  _Ptr,
size_type  _Count 
)
inlinestatic
598  { // deallocate _Count elements at _Ptr
599  _Al.deallocate(_Ptr, _Count);
600  }
unsigned int _Count
Definition: xcomplex:668
template<class _Alloc >
template<class _Ty >
static void allocator_traits< _Alloc >::destroy ( _Alloc &  _Al,
_Ty *  _Ptr 
)
inlinestatic
642  { // destroy object at _Ptr
644  }
static void _Destroy1(_Alloc &, _Ty *_Ptr, true_type)
Definition: xmemory0:629
typename _Uses_default_destroy< _Alloc, _Ptr >::type _Uses_default_destroy_t
Definition: xmemory0:509
typename _Unwrap_alloc< _Alloc >::type _Unwrap_alloc_t
Definition: xmemory0:397
template<class _Alloc >
static size_type allocator_traits< _Alloc >::max_size ( const _Alloc &  _Al)
inlinestatic
647  { // get maximum size
648  return (_Alloc_max_size::_Fn(0, _Al));
649  }
static auto _Fn(int, const _Ty &_Al) _NOEXCEPT-> decltype(_Al.max_size())
Definition: xmemory0:516
template<class _Alloc >
static _Alloc allocator_traits< _Alloc >::select_on_container_copy_construction ( const _Alloc &  _Al)
inlinestatic
653  { // get allocator to use
654  return (_Alloc_select::_Fn(0, _Al));
655  }
static auto _Fn(int, const _Ty &_Al) -> decltype((_Ty) _Al.select_on_container_copy_construction())
Definition: xmemory0:537

The documentation for this struct was generated from the following file: