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 (size_type _Count)
 
_DECLSPEC_ALLOCATOR pointer allocate (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
700  { // construct default allocator (do nothing)
701  }
template<class _Ty>
allocator< _Ty >::allocator ( const allocator< _Ty > &  )
inline
704  { // construct by copying (do nothing)
705  }
template<class _Ty>
template<class _Other >
allocator< _Ty >::allocator ( const allocator< _Other > &  )
inline
709  { // construct from a related allocator (do nothing)
710  }

Member Function Documentation

template<class _Ty>
pointer allocator< _Ty >::address ( reference  _Val) const
inline
690  { // return address of mutable _Val
691  return (_STD addressof(_Val));
692  }
constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:723
_In_ int _Val
Definition: vcruntime_string.h:62
template<class _Ty>
const_pointer allocator< _Ty >::address ( const_reference  _Val) const
inline
695  { // return address of nonmutable _Val
696  return (_STD addressof(_Val));
697  }
constexpr _Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:723
_In_ int _Val
Definition: vcruntime_string.h:62
template<class _Ty>
_DECLSPEC_ALLOCATOR pointer allocator< _Ty >::allocate ( size_type  _Count)
inline
724  { // allocate array of _Count elements
725  return (static_cast<pointer>(_Allocate(_Count, sizeof (_Ty))));
726  }
unsigned int _Count
Definition: xcomplex:668
_DECLSPEC_ALLOCATOR void * _Allocate(size_t _Count, size_t _Sz, bool _Try_aligned_allocation=true)
Definition: xmemory0:46
template<class _Ty>
_DECLSPEC_ALLOCATOR pointer allocator< _Ty >::allocate ( size_type  _Count,
const void  
)
inline
729  { // allocate array of _Count elements, ignore hint
730  return (allocate(_Count));
731  }
unsigned int _Count
Definition: xcomplex:668
_DECLSPEC_ALLOCATOR pointer allocate(size_type _Count)
Definition: xmemory0:723
template<class _Ty>
template<class _Objty , class... _Types>
void allocator< _Ty >::construct ( _Objty *  _Ptr,
_Types &&...  _Args 
)
inline
736  { // construct _Objty(_Types...) at _Ptr
737  ::new ((void *)_Ptr) _Objty(_STD forward<_Types>(_Args)...);
738  }
constexpr _Ty && forward(typename remove_reference< _Ty >::type &_Arg) _NOEXCEPT
Definition: type_traits:1273
template<class _Ty>
void allocator< _Ty >::deallocate ( pointer  _Ptr,
size_type  _Count 
)
inline
719  { // deallocate object at _Ptr
720  _Deallocate(_Ptr, _Count, sizeof (_Ty));
721  }
void _Deallocate(void *_Ptr, size_t _Count, size_t _Sz)
Definition: xmemory0:91
unsigned int _Count
Definition: xcomplex:668
template<class _Ty>
template<class _Uty >
void allocator< _Ty >::destroy ( _Uty *  _Ptr)
inline
743  { // destroy object at _Ptr
744  _Ptr->~_Uty();
745  }
template<class _Ty>
size_t allocator< _Ty >::max_size ( ) const
inline
748  { // estimate maximum array size
749  return ((size_t)(-1) / sizeof (_Ty));
750  }
template<class _Ty>
template<class _Other >
allocator<_Ty>& allocator< _Ty >::operator= ( const allocator< _Other > &  )
inline
714  { // assign from a related allocator (do nothing)
715  return (*this);
716  }

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