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
Inheritance diagram for allocator< _Ty >:
_Allocator_base< _Ty >

Classes

struct  rebind
 

Public Types

typedef allocator< _Ty > other
 
typedef _Allocator_base< _Ty > _Mybase
 
typedef _Mybase::value_type value_type
 
typedef value_typepointer
 
typedef const value_typeconst_pointer
 
typedef voidvoid_pointer
 
typedef const voidconst_void_pointer
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef size_t size_type
 
typedef ptrdiff_t difference_type
 
typedef false_type propagate_on_container_copy_assignment
 
typedef false_type propagate_on_container_move_assignment
 
typedef false_type propagate_on_container_swap
 
- Public Types inherited from _Allocator_base< _Ty >
typedef _Ty value_type
 

Public Member Functions

allocator< _Ty > select_on_container_copy_construction () const
 
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)
 
pointer allocate (size_type _Count)
 
pointer allocate (size_type _Count, const void *)
 
void construct (_Ty *_Ptr)
 
void construct (_Ty *_Ptr, const _Ty &_Val)
 
template<class _Objty , class... _Types>
void construct (_Objty *_Ptr, _Types &&..._Args)
 
template<class _Uty >
void destroy (_Uty *_Ptr)
 
size_t max_size () const _THROW0()
 

Member Typedef Documentation

template<class _Ty>
typedef _Allocator_base<_Ty> allocator< _Ty >::_Mybase
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 const void* allocator< _Ty >::const_void_pointer
template<class _Ty>
typedef ptrdiff_t allocator< _Ty >::difference_type
template<class _Ty>
typedef allocator<_Ty> allocator< _Ty >::other
template<class _Ty>
typedef value_type* allocator< _Ty >::pointer
template<class _Ty>
typedef false_type allocator< _Ty >::propagate_on_container_copy_assignment
template<class _Ty>
typedef false_type allocator< _Ty >::propagate_on_container_move_assignment
template<class _Ty>
typedef false_type allocator< _Ty >::propagate_on_container_swap
template<class _Ty>
typedef value_type& allocator< _Ty >::reference
template<class _Ty>
typedef size_t allocator< _Ty >::size_type
template<class _Ty>
typedef _Mybase::value_type allocator< _Ty >::value_type
template<class _Ty>
typedef void* allocator< _Ty >::void_pointer

Constructor & Destructor Documentation

template<class _Ty>
allocator< _Ty >::allocator ( )
inline
553  { // construct default allocator (do nothing)
554  }
template<class _Ty>
allocator< _Ty >::allocator ( const allocator< _Ty > &  )
inline
557  { // construct by copying (do nothing)
558  }
template<class _Ty>
template<class _Other >
allocator< _Ty >::allocator ( const allocator< _Other > &  )
inline
562  { // construct from a related allocator (do nothing)
563  }

Member Function Documentation

template<class _Ty>
pointer allocator< _Ty >::address ( reference  _Val) const
inline
543  { // return address of mutable _Val
544  return (_STD addressof(_Val));
545  }
_Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:91
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty>
const_pointer allocator< _Ty >::address ( const_reference  _Val) const
inline
548  { // return address of nonmutable _Val
549  return (_STD addressof(_Val));
550  }
_Ty * addressof(_Ty &_Val) _NOEXCEPT
Definition: xstddef:91
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty>
pointer allocator< _Ty >::allocate ( size_type  _Count)
inline
577  { // allocate array of _Count elements
578  return (_Allocate(_Count, (pointer)0));
579  }
_STD_BEGIN _Ty * _Allocate(size_t _Count, _Ty *)
Definition: xmemory0:21
value_type * pointer
Definition: xmemory0:516
_Diff _Count
Definition: algorithm:1941
template<class _Ty>
pointer allocator< _Ty >::allocate ( size_type  _Count,
const void  
)
inline
582  { // allocate array of _Count elements, ignore hint
583  return (allocate(_Count));
584  }
_Diff _Count
Definition: algorithm:1941
pointer allocate(size_type _Count)
Definition: xmemory0:576
template<class _Ty>
void allocator< _Ty >::construct ( _Ty *  _Ptr)
inline
587  { // default construct object at _Ptr
588  ::new ((void *)_Ptr) _Ty();
589  }
template<class _Ty>
void allocator< _Ty >::construct ( _Ty *  _Ptr,
const _Ty &  _Val 
)
inline
592  { // construct object at _Ptr with value _Val
593  ::new ((void *)_Ptr) _Ty(_Val);
594  }
_FwdIt const _Ty _Val
Definition: algorithm:1938
template<class _Ty>
template<class _Objty , class... _Types>
void allocator< _Ty >::construct ( _Objty *  _Ptr,
_Types &&...  _Args 
)
inline
599  { // construct _Objty(_Types...) at _Ptr
600  ::new ((void *)_Ptr) _Objty(_STD forward<_Types>(_Args)...);
601  }
template<class _Ty>
void allocator< _Ty >::deallocate ( pointer  _Ptr,
size_type   
)
inline
572  { // deallocate object at _Ptr, ignore size
573  ::operator delete(_Ptr);
574  }
template<class _Ty>
template<class _Uty >
void allocator< _Ty >::destroy ( _Uty *  _Ptr)
inline
606  { // destroy object at _Ptr
607  _Ptr->~_Uty();
608  }
template<class _Ty>
size_t allocator< _Ty >::max_size ( ) const
inline
611  { // estimate maximum array size
612  return ((size_t)(-1) / sizeof (_Ty));
613  }
template<class _Ty>
template<class _Other >
allocator<_Ty>& allocator< _Ty >::operator= ( const allocator< _Other > &  )
inline
567  { // assign from a related allocator (do nothing)
568  return (*this);
569  }
template<class _Ty>
allocator<_Ty> allocator< _Ty >::select_on_container_copy_construction ( ) const
inline
532  { // return this allocator
533  return (*this);
534  }

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