STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Public Types | Public Member Functions | Private Types | List of all members
scoped_allocator_adaptor< _Outer, _Inner > Class Template Reference
Inheritance diagram for scoped_allocator_adaptor< _Outer, _Inner >:
_Scoped_base< _Outer, _Inner...>

Classes

struct  rebind
 

Public Types

typedef _Outer outer_allocator_type
 
typedef _Mybase::inner_allocator_type inner_allocator_type
 
typedef _Outer_traits::value_type value_type
 
typedef _Outer_traits::pointer pointer
 
typedef _Outer_traits::const_pointer const_pointer
 
typedef _Outer_traits::void_pointer void_pointer
 
typedef _Outer_traits::const_void_pointer const_void_pointer
 
typedef _Outer_traits::size_type size_type
 
typedef _Outer_traits::difference_type difference_type
 
typedef _Scoped_propagate_on_container_copy< _Outermost, _Inner...>::type propagate_on_container_copy_assignment
 
typedef _Scoped_propagate_on_container_move< _Outermost, _Inner...>::type propagate_on_container_move_assignment
 
typedef _Scoped_propagate_on_container_swap< _Outermost, _Inner...>::type propagate_on_container_swap
 

Public Member Functions

outer_allocator_typeouter_allocator () _NOEXCEPT
 
const outer_allocator_typeouter_allocator () const _NOEXCEPT
 
inner_allocator_typeinner_allocator () _NOEXCEPT
 
const inner_allocator_typeinner_allocator () const _NOEXCEPT
 
 scoped_allocator_adaptor ()
 
 scoped_allocator_adaptor (const scoped_allocator_adaptor &_Right) _NOEXCEPT
 
template<class _Other >
 scoped_allocator_adaptor (_Other &&_Other_arg, const _Inner &..._Inner_arg) _NOEXCEPT
 
template<class _Other >
 scoped_allocator_adaptor (const scoped_allocator_adaptor< _Other, _Inner...> &_Right) _NOEXCEPT
 
template<class _Other >
 scoped_allocator_adaptor (scoped_allocator_adaptor< _Other, _Inner...> &&_Right) _NOEXCEPT
 
template<class _Other >
scoped_allocator_adaptoroperator= (scoped_allocator_adaptor< _Other, _Inner...> &&_Right)
 
template<class _Other >
scoped_allocator_adaptoroperator= (const scoped_allocator_adaptor< _Other, _Inner...> &_Right)
 
pointer allocate (size_type _Count)
 
pointer allocate (size_type _Count, const_void_pointer _Hint)
 
void deallocate (pointer _Ptr, size_type _Count)
 
size_type max_size () const
 
template<class _Ty , class... _Types>
void construct (_Ty *_Ptr, _Types &&..._Args)
 
template<class _Ty >
void destroy (_Ty *_Ptr)
 
template<class _Ty1 , class _Ty2 , class _Tpl1 , class _Tpl2 >
void construct (pair< _Ty1, _Ty2 > *_Ptr, piecewise_construct_t, _Tpl1 _Val1, _Tpl2 _Val2)
 
template<class _Ty1 , class _Ty2 >
void construct (pair< _Ty1, _Ty2 > *_Ptr)
 
template<class _Ty1 , class _Ty2 , class _Uy1 , class _Uy2 >
void construct (pair< _Ty1, _Ty2 > *_Ptr, _Uy1 &&_Val1, _Uy2 &&_Val2)
 
template<class _Ty1 , class _Ty2 , class _Uy1 , class _Uy2 >
void construct (pair< _Ty1, _Ty2 > *_Ptr, const pair< _Uy1, _Uy2 > &_Other)
 
template<class _Ty1 , class _Ty2 , class _Uy1 , class _Uy2 >
void construct (pair< _Ty1, _Ty2 > *_Ptr, pair< _Uy1, _Uy2 > &&_Other)
 

Private Types

typedef _Scoped_base< _Outer, _Inner...> _Mybase
 
typedef allocator_traits< _Outer > _Outer_traits
 
typedef _Scoped_outermost_allocator< _Outer >::type _Outermost
 
typedef allocator_traits< _Outermost_Outermost_traits
 

Member Typedef Documentation

template<class _Outer, class... _Inner>
typedef _Scoped_base<_Outer, _Inner...> scoped_allocator_adaptor< _Outer, _Inner >::_Mybase
private
template<class _Outer, class... _Inner>
typedef allocator_traits<_Outer> scoped_allocator_adaptor< _Outer, _Inner >::_Outer_traits
private
template<class _Outer, class... _Inner>
typedef _Scoped_outermost_allocator<_Outer>::type scoped_allocator_adaptor< _Outer, _Inner >::_Outermost
private
template<class _Outer, class... _Inner>
typedef allocator_traits<_Outermost> scoped_allocator_adaptor< _Outer, _Inner >::_Outermost_traits
private
template<class _Outer, class... _Inner>
typedef _Outer_traits::const_pointer scoped_allocator_adaptor< _Outer, _Inner >::const_pointer
template<class _Outer, class... _Inner>
typedef _Outer_traits::const_void_pointer scoped_allocator_adaptor< _Outer, _Inner >::const_void_pointer
template<class _Outer, class... _Inner>
typedef _Outer_traits::difference_type scoped_allocator_adaptor< _Outer, _Inner >::difference_type
template<class _Outer, class... _Inner>
typedef _Mybase::inner_allocator_type scoped_allocator_adaptor< _Outer, _Inner >::inner_allocator_type
template<class _Outer, class... _Inner>
typedef _Outer scoped_allocator_adaptor< _Outer, _Inner >::outer_allocator_type
template<class _Outer, class... _Inner>
typedef _Outer_traits::pointer scoped_allocator_adaptor< _Outer, _Inner >::pointer
template<class _Outer, class... _Inner>
typedef _Scoped_propagate_on_container_copy<_Outermost, _Inner...>::type scoped_allocator_adaptor< _Outer, _Inner >::propagate_on_container_copy_assignment
template<class _Outer, class... _Inner>
typedef _Scoped_propagate_on_container_move<_Outermost, _Inner...>::type scoped_allocator_adaptor< _Outer, _Inner >::propagate_on_container_move_assignment
template<class _Outer, class... _Inner>
typedef _Scoped_propagate_on_container_swap<_Outermost, _Inner...>::type scoped_allocator_adaptor< _Outer, _Inner >::propagate_on_container_swap
template<class _Outer, class... _Inner>
typedef _Outer_traits::size_type scoped_allocator_adaptor< _Outer, _Inner >::size_type
template<class _Outer, class... _Inner>
typedef _Outer_traits::value_type scoped_allocator_adaptor< _Outer, _Inner >::value_type
template<class _Outer, class... _Inner>
typedef _Outer_traits::void_pointer scoped_allocator_adaptor< _Outer, _Inner >::void_pointer

Constructor & Destructor Documentation

template<class _Outer, class... _Inner>
scoped_allocator_adaptor< _Outer, _Inner >::scoped_allocator_adaptor ( )
inline
385  { // default construct
386  }
template<class _Outer, class... _Inner>
scoped_allocator_adaptor< _Outer, _Inner >::scoped_allocator_adaptor ( const scoped_allocator_adaptor< _Outer, _Inner > &  _Right)
inline
389  : _Mybase(_Right.outer_allocator(),
390  _Right.inner_allocator())
391  { // construct from _Right
392  }
outer_allocator_type & outer_allocator() _NOEXCEPT
Definition: scoped_allocator:363
_Scoped_base< _Outer, _Inner...> _Mybase
Definition: scoped_allocator:328
inner_allocator_type & inner_allocator() _NOEXCEPT
Definition: scoped_allocator:373
template<class _Outer, class... _Inner>
template<class _Other >
scoped_allocator_adaptor< _Outer, _Inner >::scoped_allocator_adaptor ( _Other &&  _Other_arg,
const _Inner &...  _Inner_arg 
)
inline
397  : _Mybase(_STD forward<_Other>(_Other_arg),
398  _STD forward<inner_allocator_type>(
399  inner_allocator_type(_Inner_arg...)))
400  { // construct from (_Other, _Inner...)
401  }
_Mybase::inner_allocator_type inner_allocator_type
Definition: scoped_allocator:335
_Scoped_base< _Outer, _Inner...> _Mybase
Definition: scoped_allocator:328
template<class _Outer, class... _Inner>
template<class _Other >
scoped_allocator_adaptor< _Outer, _Inner >::scoped_allocator_adaptor ( const scoped_allocator_adaptor< _Other, _Inner...> &  _Right)
inline
406  : _Mybase(_Right.outer_allocator(),
407  _Right.inner_allocator())
408  { // construct from const adaptor<_Other, _Inner...>&
409  }
outer_allocator_type & outer_allocator() _NOEXCEPT
Definition: scoped_allocator:363
_Scoped_base< _Outer, _Inner...> _Mybase
Definition: scoped_allocator:328
inner_allocator_type & inner_allocator() _NOEXCEPT
Definition: scoped_allocator:373
template<class _Outer, class... _Inner>
template<class _Other >
scoped_allocator_adaptor< _Outer, _Inner >::scoped_allocator_adaptor ( scoped_allocator_adaptor< _Other, _Inner...> &&  _Right)
inline
414  : _Mybase(_STD forward<_Other>(_Right.outer_allocator()),
415  _Right.inner_allocator())
416  { // construct from adaptor<_Other, _Inner...>&&
417  }
outer_allocator_type & outer_allocator() _NOEXCEPT
Definition: scoped_allocator:363
_Scoped_base< _Outer, _Inner...> _Mybase
Definition: scoped_allocator:328
inner_allocator_type & inner_allocator() _NOEXCEPT
Definition: scoped_allocator:373

Member Function Documentation

template<class _Outer, class... _Inner>
pointer scoped_allocator_adaptor< _Outer, _Inner >::allocate ( size_type  _Count)
inline
436  { // allocate array of _Count elements, ignore hint
438  _Count));
439  }
outer_allocator_type & outer_allocator() _NOEXCEPT
Definition: scoped_allocator:363
_Diff _Count
Definition: algorithm:1941
static pointer allocate(_Alloc &_Al, size_type _Count)
Definition: xmemory0:446
template<class _Outer, class... _Inner>
pointer scoped_allocator_adaptor< _Outer, _Inner >::allocate ( size_type  _Count,
const_void_pointer  _Hint 
)
inline
442  { // allocate array of _Count elements, with hint
444  _Count, _Hint));
445  }
outer_allocator_type & outer_allocator() _NOEXCEPT
Definition: scoped_allocator:363
_Diff _Count
Definition: algorithm:1941
static pointer allocate(_Alloc &_Al, size_type _Count)
Definition: xmemory0:446
template<class _Outer, class... _Inner>
template<class _Ty , class... _Types>
void scoped_allocator_adaptor< _Outer, _Inner >::construct ( _Ty *  _Ptr,
_Types &&...  _Args 
)
inline
461  { // construct with varying allocator styles
464  inner_allocator(),
465  uses_allocator<_Ty, inner_allocator_type>(),
467  _Ptr, _STD forward<_Types>(_Args)...);
468  }
Definition: scoped_allocator:85
Definition: type_traits:619
void _Scoped_construct(_Outermost, _Inner, false_type, _Dont_care, _Ty *_Ptr, _Types &&..._Args)
Definition: scoped_allocator:113
inner_allocator_type & inner_allocator() _NOEXCEPT
Definition: scoped_allocator:373
template<class _Outer, class... _Inner>
template<class _Ty1 , class _Ty2 , class _Tpl1 , class _Tpl2 >
void scoped_allocator_adaptor< _Outer, _Inner >::construct ( pair< _Ty1, _Ty2 > *  _Ptr,
piecewise_construct_t  ,
_Tpl1  _Val1,
_Tpl2  _Val2 
)
inline
484  { // construct pair from tuples
486  }
void _Scoped_construct_pair(_Inner _Inner_alval, pair< _Ty1, _Ty2 > *_Ptr, tuple< _Uy1...> _Val1, tuple< _Uy2...> _Val2)
Definition: scoped_allocator:186
_Types1 &&::value _Val2
Definition: tuple:759
inner_allocator_type & inner_allocator() _NOEXCEPT
Definition: scoped_allocator:373
template<class _Outer, class... _Inner>
template<class _Ty1 , class _Ty2 >
void scoped_allocator_adaptor< _Outer, _Inner >::construct ( pair< _Ty1, _Ty2 > *  _Ptr)
inline
491  { // construct pair from pointer to other pair
492  this->construct(_Ptr, piecewise_construct,
493  tuple<>(),
494  tuple<>());
495  }
void construct(_Ty *_Ptr, _Types &&..._Args)
Definition: scoped_allocator:460
Definition: tuple:130
const piecewise_construct_t piecewise_construct
Definition: utility:69
template<class _Outer, class... _Inner>
template<class _Ty1 , class _Ty2 , class _Uy1 , class _Uy2 >
void scoped_allocator_adaptor< _Outer, _Inner >::construct ( pair< _Ty1, _Ty2 > *  _Ptr,
_Uy1 &&  _Val1,
_Uy2 &&  _Val2 
)
inline
503  { // construct pair from two movable values
504  this->construct(_Ptr, piecewise_construct,
505  forward_as_tuple(_STD forward<_Uy1>(_Val1)),
506  forward_as_tuple(_STD forward<_Uy2>(_Val2)));
507  }
void construct(_Ty *_Ptr, _Types &&..._Args)
Definition: scoped_allocator:460
tuple< _Types &&...> forward_as_tuple(_Types &&..._Args) _NOEXCEPT
Definition: tuple:627
_Types1 &&::value _Val2
Definition: tuple:759
const piecewise_construct_t piecewise_construct
Definition: utility:69
template<class _Outer, class... _Inner>
template<class _Ty1 , class _Ty2 , class _Uy1 , class _Uy2 >
void scoped_allocator_adaptor< _Outer, _Inner >::construct ( pair< _Ty1, _Ty2 > *  _Ptr,
const pair< _Uy1, _Uy2 > &  _Other 
)
inline
515  { // construct pair from copyable pair
516  this->construct(_Ptr, piecewise_construct,
517  forward_as_tuple(_Other.first),
518  forward_as_tuple(_Other.second));
519  }
void construct(_Ty *_Ptr, _Types &&..._Args)
Definition: scoped_allocator:460
tuple< _Types &&...> forward_as_tuple(_Types &&..._Args) _NOEXCEPT
Definition: tuple:627
_Ty1 first
Definition: utility:198
const piecewise_construct_t piecewise_construct
Definition: utility:69
second
Definition: utility:167
template<class _Outer, class... _Inner>
template<class _Ty1 , class _Ty2 , class _Uy1 , class _Uy2 >
void scoped_allocator_adaptor< _Outer, _Inner >::construct ( pair< _Ty1, _Ty2 > *  _Ptr,
pair< _Uy1, _Uy2 > &&  _Other 
)
inline
527  { // construct pair from movable pair
528  this->construct(_Ptr, piecewise_construct,
529  forward_as_tuple(_STD forward<_Uy1>(_Other.first)),
530  forward_as_tuple(_STD forward<_Uy2>(_Other.second)));
531  }
void construct(_Ty *_Ptr, _Types &&..._Args)
Definition: scoped_allocator:460
tuple< _Types &&...> forward_as_tuple(_Types &&..._Args) _NOEXCEPT
Definition: tuple:627
_Ty1 first
Definition: utility:198
const piecewise_construct_t piecewise_construct
Definition: utility:69
second
Definition: utility:167
template<class _Outer, class... _Inner>
void scoped_allocator_adaptor< _Outer, _Inner >::deallocate ( pointer  _Ptr,
size_type  _Count 
)
inline
448  { // deallocate object at _Ptr, with size
450  _Ptr, _Count));
451  }
outer_allocator_type & outer_allocator() _NOEXCEPT
Definition: scoped_allocator:363
_Diff _Count
Definition: algorithm:1941
static void deallocate(_Alloc &_Al, pointer _Ptr, size_type _Count)
Definition: xmemory0:457
template<class _Outer, class... _Inner>
template<class _Ty >
void scoped_allocator_adaptor< _Outer, _Inner >::destroy ( _Ty *  _Ptr)
inline
472  { // destroy object at _Ptr
474  _Outermost_traits::destroy(_Alval, _Ptr);
475  }
Definition: scoped_allocator:85
_Scoped_outermost_allocator< _Outer >::type _Outermost
Definition: scoped_allocator:330
static void destroy(_Alloc &_Al, _Ty *_Ptr)
Definition: xmemory0:474
template<class _Outer, class... _Inner>
inner_allocator_type& scoped_allocator_adaptor< _Outer, _Inner >::inner_allocator ( )
inline
374  { // get reference to inner allocator
375  return (const_cast<inner_allocator_type&>(
376  this->_Get_inner_object(*this)));
377  }
template<class _Outer, class... _Inner>
const inner_allocator_type& scoped_allocator_adaptor< _Outer, _Inner >::inner_allocator ( ) const
inline
380  { // get reference to inner allocator
381  return (this->_Get_inner_object(*this));
382  }
template<class _Outer, class... _Inner>
size_type scoped_allocator_adaptor< _Outer, _Inner >::max_size ( ) const
inline
454  { // estimate maximum array size
456  }
outer_allocator_type & outer_allocator() _NOEXCEPT
Definition: scoped_allocator:363
static size_type max_size(const _Alloc &_Al)
Definition: xmemory0:479
template<class _Outer, class... _Inner>
template<class _Other >
scoped_allocator_adaptor& scoped_allocator_adaptor< _Outer, _Inner >::operator= ( scoped_allocator_adaptor< _Other, _Inner...> &&  _Right)
inline
422  { // assign from adaptor<_Other, _Inner...>&&
423  _Mybase::operator=(_STD forward<_Other>(_Right));
424  return (*this);
425  }
template<class _Outer, class... _Inner>
template<class _Other >
scoped_allocator_adaptor& scoped_allocator_adaptor< _Outer, _Inner >::operator= ( const scoped_allocator_adaptor< _Other, _Inner...> &  _Right)
inline
430  { // assign from adaptor<_Other, _Inner...>&
431  _Mybase::operator=(_Right);
432  return (*this);
433  }
template<class _Outer, class... _Inner>
outer_allocator_type& scoped_allocator_adaptor< _Outer, _Inner >::outer_allocator ( )
inline
364  { // get reference to outer allocator
365  return (static_cast<_Outer&>(*this));
366  }
template<class _Outer, class... _Inner>
const outer_allocator_type& scoped_allocator_adaptor< _Outer, _Inner >::outer_allocator ( ) const
inline
369  { // get reference to outer allocator
370  return (static_cast<const _Outer&>(*this));
371  }

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