STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Public Attributes | List of all members
_State_deleter< _Ty, _Derived, _Alloc > Struct Template Reference
Inheritance diagram for _State_deleter< _Ty, _Derived, _Alloc >:
_Deleter_base< _Ty >

Public Member Functions

 _State_deleter (const _Alloc &_Al)
 
 _State_deleter (const _State_deleter &)=delete
 
_State_deleteroperator= (const _State_deleter &)=delete
 
void _Delete (_Associated_state< _Ty > *_State)
 
- Public Member Functions inherited from _Deleter_base< _Ty >
virtual ~_Deleter_base () _NOEXCEPT
 

Public Attributes

_Alloc _My_alloc
 

Constructor & Destructor Documentation

template<class _Ty , class _Derived , class _Alloc >
_State_deleter< _Ty, _Derived, _Alloc >::_State_deleter ( const _Alloc &  _Al)
inline
235  : _My_alloc(_Al)
236  { // construct with allocator
237  }
_Alloc _My_alloc
Definition: future:244
template<class _Ty , class _Derived , class _Alloc >
_State_deleter< _Ty, _Derived, _Alloc >::_State_deleter ( const _State_deleter< _Ty, _Derived, _Alloc > &  )
delete

Member Function Documentation

template<class _Ty , class _Derived , class _Alloc >
void _State_deleter< _Ty, _Derived, _Alloc >::_Delete ( _Associated_state< _Ty > *  _State)
inlinevirtual

Implements _Deleter_base< _Ty >.

532  { // delete _State and this using stored allocator
533  typedef _Wrap_alloc<_Alloc> _Alty0;
534 
535  typedef typename _Alty0::template rebind<_Derived>
536  ::other _State_allocator;
537  _State_allocator _St_alloc(_My_alloc);
538 
539  typedef typename _Alty0::template rebind<_State_deleter>
540  ::other _Deleter_allocator;
541  _Deleter_allocator _Del_alloc(_My_alloc);
542 
543  _Derived *_Ptr = static_cast<_Derived *>(_State);
544 
545  _St_alloc.destroy(_Ptr);
546  _St_alloc.deallocate(_Ptr, 1);
547 
548  _Del_alloc.destroy(this);
549  _Del_alloc.deallocate(this, 1);
550  }
Definition: xmemory0:380
_Alloc _My_alloc
Definition: future:244
template<class _Ty , class _Derived , class _Alloc >
_State_deleter& _State_deleter< _Ty, _Derived, _Alloc >::operator= ( const _State_deleter< _Ty, _Derived, _Alloc > &  )
delete

Member Data Documentation

template<class _Ty , class _Derived , class _Alloc >
_Alloc _State_deleter< _Ty, _Derived, _Alloc >::_My_alloc

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