![]() |
Home | Libraries | People | FAQ | More |
boost::container::small_vector_allocator
// In header: <boost/container/small_vector.hpp> template<typename T, typename VoidAlloc, 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 (); () ; () ; template<typename U, typename OtherVoidAllocator, typename OtherOptions> () ; template<typename U, typename OtherVoidAllocator, typename OtherOptions> () ; () ; () ; () ; template<typename U, typename OtherVoidAllocator> () ; template<typename U, typename OtherVoidAllocator> () ; () ; // public member functions (); (, = ); (, ) ; () ; () ; () ; // friend functions (, ) ; (, ) ; (, ) ; };
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();
( other) ;
Constructor from other small_vector_allocator. Never throws
( other) ;
Move constructor from small_vector_allocator. Never throws
template<typename U, typename OtherVoidAllocator, typename OtherOptions> ( other) ;
Constructor from related small_vector_allocator. Never throws
template<typename U, typename OtherVoidAllocator, typename OtherOptions> ( other) ;
Move constructor from related small_vector_allocator. Never throws
( other) ;
Constructor from allocator_type. Never throws
( other) ;
Assignment from other small_vector_allocator. Never throws
( other) ;
Move assignment from other small_vector_allocator. Never throws
template<typename U, typename OtherVoidAllocator> ( other) ;
Assignment from related small_vector_allocator. Never throws
template<typename U, typename OtherVoidAllocator> ( other) ;
Move assignment from related small_vector_allocator. Never throws
( other) ;
Move assignment from allocator_type. Never throws
small_vector_allocator public member functions();
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
() ;
( p) ;
small_vector_allocator friend functions( l, r) ;
Swaps two allocators, does nothing because this small_vector_allocator is stateless
( l, 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)
( l, r) ;
An small_vector_allocator always compares to false, as memory allocated with one instance can be deallocated by another instance