STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Types | Public Member Functions | List of all members
allocator< _Ty > Class Template Reference

Classes

struct  rebind
 

Public Types

typedef void _Not_user_specialized
 
typedef _Ty value_type
 
typedef value_typepointer
 
typedef const value_typeconst_pointer
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef size_t size_type
 
typedef ptrdiff_t difference_type
 
typedef true_type propagate_on_container_move_assignment
 
typedef true_type is_always_equal
 

Public Member Functions

pointer address (reference _Val) const _NOEXCEPT
 
const_pointer address (const_reference _Val) const _NOEXCEPT
 
 allocator () _THROW0()
 
 allocator (const allocator< _Ty > &) _THROW0()
 
template<class _Other >
 allocator (const allocator< _Other > &) _THROW0()
 
template<class _Other >
allocator< _Ty > & operator= (const allocator< _Other > &)
 
void deallocate (pointer _Ptr, size_type _Count)
 
_DECLSPEC_ALLOCATOR pointer allocate (_CRT_GUARDOVERFLOW size_type _Count)
 
_DECLSPEC_ALLOCATOR pointer allocate (_CRT_GUARDOVERFLOW size_type _Count, const void *)
 
template<class _Objty , class... _Types>
void construct (_Objty *_Ptr, _Types &&..._Args)
 
template<class _Uty >
void destroy (_Uty *_Ptr)
 
size_t max_size () const _NOEXCEPT
 

Member Typedef Documentation

template<class _Ty >
typedef void allocator< _Ty >::_Not_user_specialized
template<class _Ty >
typedef const value_type* allocator< _Ty >::const_pointer
template<class _Ty >
typedef const value_type& allocator< _Ty >::const_reference
template<class _Ty >
typedef ptrdiff_t allocator< _Ty >::difference_type
template<class _Ty >
typedef true_type allocator< _Ty >::is_always_equal
template<class _Ty >
typedef value_type* allocator< _Ty >::pointer
template<class _Ty >
typedef true_type allocator< _Ty >::propagate_on_container_move_assignment
template<class _Ty >
typedef value_type& allocator< _Ty >::reference
template<class _Ty >
typedef size_t allocator< _Ty >::size_type
template<class _Ty >
typedef _Ty allocator< _Ty >::value_type

Constructor & Destructor Documentation

template<class _Ty >
allocator< _Ty >::allocator ( )
inline
803  { // construct default allocator (do nothing)
804  }
template<class _Ty >
allocator< _Ty >::allocator ( const allocator< _Ty > &  )
inline
807  { // construct by copying (do nothing)
808  }
template<class _Ty >
template<class _Other >
allocator< _Ty >::allocator ( const allocator< _Other > &  )
inline
812  { // construct from a related allocator (do nothing)
813  }

Member Function Documentation

template<class _Ty >
pointer allocator< _Ty >::address ( reference  _Val) const
inline
793  { // return address of mutable _Val
794  return (_STD addressof(_Val));
795  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty >
const_pointer allocator< _Ty >::address ( const_reference  _Val) const
inline
798  { // return address of nonmutable _Val
799  return (_STD addressof(_Val));
800  }
_STD_BEGIN constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:628
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty >
_DECLSPEC_ALLOCATOR pointer allocator< _Ty >::allocate ( _CRT_GUARDOVERFLOW size_type  _Count)
inline
827  { // allocate array of _Count elements
828  return (static_cast<pointer>(_Allocate(_Count, sizeof (_Ty))));
829  }
_DECLSPEC_ALLOCATOR void * _Allocate(size_t _Count, size_t _Sz, bool _Try_aligned_allocation=true)
Definition: xmemory0:48
_Diff _Count
Definition: algorithm:1941
template<class _Ty >
_DECLSPEC_ALLOCATOR pointer allocator< _Ty >::allocate ( _CRT_GUARDOVERFLOW size_type  _Count,
const void  
)
inline
832  { // allocate array of _Count elements, ignore hint
833  return (allocate(_Count));
834  }
_DECLSPEC_ALLOCATOR pointer allocate(_CRT_GUARDOVERFLOW size_type _Count)
Definition: xmemory0:826
_Diff _Count
Definition: algorithm:1941
template<class _Ty >
template<class _Objty , class... _Types>
void allocator< _Ty >::construct ( _Objty *  _Ptr,
_Types &&...  _Args 
)
inline
839  { // construct _Objty(_Types...) at _Ptr
840  ::new ((void *)_Ptr) _Objty(_STD forward<_Types>(_Args)...);
841  }
constexpr _Ty && forward(typename remove_reference< _Ty >::type &_Arg) _NOEXCEPT
Definition: type_traits:1332
template<class _Ty >
void allocator< _Ty >::deallocate ( pointer  _Ptr,
size_type  _Count 
)
inline
822  { // deallocate object at _Ptr
823  _Deallocate(_Ptr, _Count, sizeof (_Ty));
824  }
void _Deallocate(void *_Ptr, size_t _Count, size_t _Sz)
Definition: xmemory0:95
_Diff _Count
Definition: algorithm:1941
template<class _Ty >
template<class _Uty >
void allocator< _Ty >::destroy ( _Uty *  _Ptr)
inline
845  { // destroy object at _Ptr
846  _Ptr->~_Uty();
847  }
template<class _Ty >
size_t allocator< _Ty >::max_size ( ) const
inline
850  { // estimate maximum array size
851  return ((size_t)(-1) / sizeof (_Ty));
852  }
template<class _Ty >
template<class _Other >
allocator<_Ty>& allocator< _Ty >::operator= ( const allocator< _Other > &  )
inline
817  { // assign from a related allocator (do nothing)
818  return (*this);
819  }

The documentation for this class was generated from the following files: