![]() |
Home | Libraries | People | FAQ | More |
boost::container::small_vector
// In header: <boost/container/small_vector.hpp> template<typename T, N, typename Allocator, typename Options> class small_vector : public { public: // construct/copy/destruct () ; (); (); (, ); (, default_init_t); (, default_init_t, ); (, ); (, , ); template<typename InIt> (, ); template<typename InIt> (, , ); (small_vector &); (small_vector &, ); (base_type &); (base_type &&); (small_vector &&) ; (small_vector &&, ); (, = ); small_vector & (small_vector &); small_vector & (small_vector &&) ; small_vector & (base_type &); small_vector & (base_type &&); // public member functions (small_vector &); };
small_vector is a vector-like container optimized for the case when it contains few elements. It contains some preallocated elements in-place, which can avoid the use of dynamic storage allocation when the actual number of elements is below that preallocated threshold.
small_vector<T, N, Allocator, Options>
is convertible to small_vector_base<T, Allocator, Options>
that is independent from the preallocated element capacity, so client code does not need to be templated on that N argument.
All boost::container::vector
member functions are inherited. See vector
documentation for details.
typename T
The type of object that is stored in the small_vector
N
The number of preallocated elements stored inside small_vector
. It shall be less than Allocator::max_size();
typename Allocator
The allocator used for memory management when the number of elements exceeds N. Use void for the default allocator |tparam Options A type produced from
. boost::container::small_vector_options
typename Options
small_vector
public
construct/copy/destruct() ;
( a);
( n);
( n, a);
( n, default_init_t);
( n, default_init_t, a);
( n, v);
( n, v, a);
template<typename InIt> ( first, BOOST_CONTAINER_DOCIGN);
template<typename InIt> ( first, last, BOOST_CONTAINER_DOCIGN);
(small_vector & other);
(small_vector & other, a);
(base_type & other);
(base_type && other);
(small_vector && other) ;
(small_vector && other, a);
( il, a = );
small_vector & (small_vector & other);
small_vector & (small_vector && other) ;
small_vector & (base_type & other);
small_vector & (base_type && other);