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, _CRT_GUARDOVERFLOW size_type _Count)
 
static _DECLSPEC_ALLOCATOR pointer allocate (_Alloc &_Al, _CRT_GUARDOVERFLOW 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
709  { // construct _Ty(_Types...) at _Ptr, default version
710  ::new (static_cast<void *>(_Ptr))
711  _Ty(_STD forward<_Types>(_Args)...);
712  }
constexpr _Ty && forward(typename remove_reference< _Ty >::type &_Arg) _NOEXCEPT
Definition: type_traits:1332
template<class _Alloc >
template<class _Ty , class... _Types>
static void allocator_traits< _Alloc >::_Construct1 ( false_type  ,
_Alloc &  _Al,
_Ty *  _Ptr,
_Types &&...  _Args 
)
inlinestatic
718  { // construct _Ty(_Types...) at _Ptr, allocator-supplied version
719  _Al.construct(_Ptr, _STD forward<_Types>(_Args)...);
720  }
template<class _Alloc >
template<class _Ty >
static void allocator_traits< _Alloc >::_Destroy1 ( _Alloc &  ,
_Ty *  _Ptr,
true_type   
)
inlinestatic
733  { // destroy object at _Ptr, default version
734  _Ptr->~_Ty();
735  }
template<class _Alloc >
template<class _Ty >
static void allocator_traits< _Alloc >::_Destroy1 ( _Alloc &  _Al,
_Ty *  _Ptr,
false_type   
)
inlinestatic
739  { // destroy object at _Ptr, allocator-supplied version
740  _Al.destroy(_Ptr);
741  }
template<class _Alloc >
static _DECLSPEC_ALLOCATOR pointer allocator_traits< _Alloc >::allocate ( _Alloc &  _Al,
_CRT_GUARDOVERFLOW size_type  _Count 
)
inlinestatic
689  { // allocate array of _Count elements
690  return (_Al.allocate(_Count));
691  }
_Diff _Count
Definition: algorithm:1941
template<class _Alloc >
static _DECLSPEC_ALLOCATOR pointer allocator_traits< _Alloc >::allocate ( _Alloc &  _Al,
_CRT_GUARDOVERFLOW size_type  _Count,
const_void_pointer  _Hint 
)
inlinestatic
695  { // allocate array of _Count elements, with hint
696  return (_Alloc_allocate::_Fn(0, _Al, _Count, _Hint));
697  }
static auto _Fn(int, _Alloc &_Al, _Size_type _Count, _Const_void_pointer _Hint) -> decltype(_Al.allocate(_Count, _Hint))
Definition: xmemory0:525
_Diff _Count
Definition: algorithm:1941
template<class _Alloc >
template<class _Ty , class... _Types>
static void allocator_traits< _Alloc >::construct ( _Alloc &  _Al,
_Ty *  _Ptr,
_Types &&...  _Args 
)
inlinestatic
726  { // construct _Ty(_Types...) at _Ptr
728  _Al, _Ptr, _STD forward<_Types>(_Args)...);
729  }
static void _Construct1(true_type, _Alloc &, _Ty *_Ptr, _Types &&..._Args)
Definition: xmemory0:707
typename _Unwrap_alloc< _Alloc >::type _Unwrap_alloc_t
Definition: xmemory0:500
typename _Uses_default_construct< _Alloc, _Ptr, _Args...>::type _Uses_default_construct_t
Definition: xmemory0:579
template<class _Alloc >
static void allocator_traits< _Alloc >::deallocate ( _Alloc &  _Al,
pointer  _Ptr,
size_type  _Count 
)
inlinestatic
701  { // deallocate _Count elements at _Ptr
702  _Al.deallocate(_Ptr, _Count);
703  }
_Diff _Count
Definition: algorithm:1941
template<class _Alloc >
template<class _Ty >
static void allocator_traits< _Alloc >::destroy ( _Alloc &  _Al,
_Ty *  _Ptr 
)
inlinestatic
745  { // destroy object at _Ptr
747  }
static void _Destroy1(_Alloc &, _Ty *_Ptr, true_type)
Definition: xmemory0:732
typename _Uses_default_destroy< _Alloc, _Ptr >::type _Uses_default_destroy_t
Definition: xmemory0:612
typename _Unwrap_alloc< _Alloc >::type _Unwrap_alloc_t
Definition: xmemory0:500
template<class _Alloc >
static size_type allocator_traits< _Alloc >::max_size ( const _Alloc &  _Al)
inlinestatic
750  { // get maximum size
751  return (_Alloc_max_size::_Fn(0, _Al));
752  }
static auto _Fn(int, const _Ty &_Al) _NOEXCEPT-> decltype(_Al.max_size())
Definition: xmemory0:619
template<class _Alloc >
static _Alloc allocator_traits< _Alloc >::select_on_container_copy_construction ( const _Alloc &  _Al)
inlinestatic
756  { // get allocator to use
757  return (_Alloc_select::_Fn(0, _Al));
758  }
static auto _Fn(int, const _Ty &_Al) -> decltype((_Ty) _Al.select_on_container_copy_construction())
Definition: xmemory0:640

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