![]() |
Home | Libraries | People | FAQ | More |
boost::container::small_vector_allocator
// In header: <boost/container/small_vector.hpp> template<typename T, typename VoidAllocator, typename Options> class small_vector_allocator : public { public: // types typedef allocator_traits< ; typedef allocator_traits< ; typedef allocator_traits< ; typedef allocator_traits< ; typedef allocator_traits< ; typedef allocator_traits< ; typedef allocator_traits< ; typedef allocator_traits< ; typedef allocator_traits< ; typedef allocator_traits< ; typedef allocator_traits< ; typedef allocator_traits< ; typedef ; // An integral constant with membervalue == false
typedef ; // An integral constant with membervalue == true
// construct/copy/destruct () ; (small_vector_allocator &) ; (small_vector_allocator &&) ; template<typename U, typename OtherVoidAllocator, typename OtherOptions> (small_vector_allocator< ) ; template<typename U, typename OtherVoidAllocator, typename OtherOptions> (small_vector_allocator< ) ; () ; small_vector_allocator & (small_vector_allocator &) ; small_vector_allocator & (small_vector_allocator &&) ; template<typename U, typename OtherVoidAllocator> small_vector_allocator & (small_vector_allocator< ) ; template<typename U, typename OtherVoidAllocator> small_vector_allocator & (small_vector_allocator< ) ; small_vector_allocator & () ; // public member functions (small_vector_allocator ); (, = ); (, ) ; () ; small_vector_allocator () ; () ; // friend functions (small_vector_allocator &, small_vector_allocator &) ; (small_vector_allocator &, small_vector_allocator &) ; (small_vector_allocator &, small_vector_allocator &) ; };
A non-standard allocator used to implement small_vector
. Users should never use it directly. It is described here for documentation purposes.
This allocator inherits from a standard-conforming allocator and forwards member functions to the standard allocator except when internal storage is being used as memory source.
This allocator is a "partially_propagable" allocator and defines is_partially_propagable
as true_type.
A partially propagable allocator means that not all storage allocatod by an instance of small_vector_allocator
can be deallocated by another instance of this type, even if both instances compare equal or an instance is propagated to another one using the copy/move constructor or assignment. The storage that can never be propagated is identified by storage_is_unpropagable(p)
.
boost::container::vector
supports partially propagable allocators fallbacking to deep copy/swap/move operations when internal storage is being used to store vector elements.
small_vector_allocator
assumes that will be instantiated as boost::container::vector< T, small_vector_allocator<T, Allocator> >
and internal storage can be obtained downcasting that vector to small_vector_base<T>
.
small_vector_allocator
public
construct/copy/destruct() ;
(small_vector_allocator & other) ;
Constructor from other small_vector_allocator
. Never throws
(small_vector_allocator && other) ;
Move constructor from small_vector_allocator
. Never throws
template<typename U, typename OtherVoidAllocator, typename OtherOptions> (small_vector_allocator< other) ;
Constructor from related small_vector_allocator
. Never throws
template<typename U, typename OtherVoidAllocator, typename OtherOptions> (small_vector_allocator< other) ;
Move constructor from related small_vector_allocator
. Never throws
( other) ;
Constructor from allocator_type. Never throws
small_vector_allocator & (small_vector_allocator & other) ;
Assignment from other small_vector_allocator
. Never throws
small_vector_allocator & (small_vector_allocator && other) ;
Move assignment from other small_vector_allocator
. Never throws
template<typename U, typename OtherVoidAllocator> small_vector_allocator & (small_vector_allocator< other) ;
Assignment from related small_vector_allocator
. Never throws
template<typename U, typename OtherVoidAllocator> small_vector_allocator & (small_vector_allocator< other) ;
Move assignment from related small_vector_allocator
. Never throws
small_vector_allocator & ( other) ;
Move assignment from allocator_type. Never throws
small_vector_allocator
public member functions(small_vector_allocator );
Obtains an small_vector_allocator
that allocates objects of type T2
( count, hint = );Allocates storage from the standard-conforming allocator.
( ptr, n) ;
Deallocates previously allocated memory. Never throws
() ;
Returns the maximum number of elements that could be allocated. Never throws
small_vector_allocator () ;
( p) ;
small_vector_allocator
friend functions(small_vector_allocator & l, small_vector_allocator & r) ;
Swaps two allocators, does nothing because this small_vector_allocator
is stateless
(small_vector_allocator & l, small_vector_allocator & r) ;
An small_vector_allocator
always compares to true, as memory allocated with one instance can be deallocated by another instance (except for unpropagable storage)
(small_vector_allocator & l, small_vector_allocator & r) ;
An small_vector_allocator
always compares to false, as memory allocated with one instance can be deallocated by another instance