A variable-size array container with fixed capacity. More...
#include <static_vector.hpp>
Public Types | |
typedef base_t::value_type | value_type |
The type of elements stored in the container. More... | |
typedef base_t::size_type | size_type |
The unsigned integral type used by the container. More... | |
typedef base_t::difference_type | difference_type |
The pointers difference type. More... | |
typedef base_t::pointer | pointer |
The pointer type. More... | |
typedef base_t::const_pointer | const_pointer |
The const pointer type. More... | |
typedef base_t::reference | reference |
The value reference type. More... | |
typedef base_t::const_reference | const_reference |
The value const reference type. More... | |
typedef base_t::iterator | iterator |
The iterator type. More... | |
typedef base_t::const_iterator | const_iterator |
The const iterator type. More... | |
typedef base_t::reverse_iterator | reverse_iterator |
The reverse iterator type. More... | |
typedef base_t::const_reverse_iterator | const_reverse_iterator |
The const reverse iterator. More... | |
typedef Allocator | allocator_type |
typedef Allocator | stored_allocator_type |
Public Member Functions | |
static_vector () BOOST_CONTAINER_NOEXCEPT | |
Constructs an empty static_vector. More... | |
static_vector (size_type count) | |
Constructs a static_vector containing count value initialized values. More... | |
static_vector (size_type count, default_init_t) | |
Constructs a static_vector containing count default initialized values. More... | |
static_vector (size_type count, value_type const &value) | |
Constructs a static_vector containing count copies of value. More... | |
template<typename Iterator > | |
static_vector (Iterator first, Iterator last) | |
Constructs a static_vector containing copy of a range [first, last) . More... | |
static_vector (std::initializer_list< value_type > il) | |
Constructs a static_vector containing copy of a range [il.begin(), il.end()) . More... | |
static_vector (static_vector const &other) | |
Constructs a copy of other static_vector. More... | |
template<std::size_t C> | |
static_vector (static_vector< value_type, C > const &other) | |
Constructs a copy of other static_vector. More... | |
static_vector (BOOST_RV_REF(static_vector) other) | |
Move constructor. More... | |
template<std::size_t C> | |
static_vector (BOOST_RV_REF_BEG static_vector< value_type, C > BOOST_RV_REF_END other) | |
Move constructor. Moves Values stored in the other static_vector to this one. More... | |
static_vector & | operator= (BOOST_COPY_ASSIGN_REF(static_vector) other) |
Copy assigns Values stored in the other static_vector to this one. More... | |
static_vector & | operator= (std::initializer_list< value_type > il) |
Copy assigns Values stored in std::initializer_list to *this. More... | |
template<std::size_t C> | |
static_vector & | operator= (static_vector< value_type, C > const &other) |
Copy assigns Values stored in the other static_vector to this one. More... | |
static_vector & | operator= (BOOST_RV_REF(static_vector) other) |
Move assignment. More... | |
template<std::size_t C> | |
static_vector & | operator= (BOOST_RV_REF_BEG static_vector< value_type, C > BOOST_RV_REF_END other) |
Move assignment. Moves Values stored in the other static_vector to this one. More... | |
typedef | BOOST_CONTAINER_IMPDEF (iterator_impl) iterator |
typedef | BOOST_CONTAINER_IMPDEF (const_iterator_impl) const _iterator |
typedef | BOOST_CONTAINER_IMPDEF (container_detail::reverse_iterator< iterator >) reverse_iterator |
typedef | BOOST_CONTAINER_IMPDEF (container_detail::reverse_iterator< const_iterator >) const _reverse_iterator |
void | assign (InIt first, InIt last BOOST_CONTAINER_DOCIGN(BOOST_CONTAINER_I typename container_detail::enable_if_c< !container_detail::is_convertible< InIt BOOST_CONTAINER_I size_type >::value &&(container_detail::is_input_iterator< InIt >::value||container_detail::is_same< alloc_version BOOST_CONTAINER_I allocator_v0 >::value) >::type *=0)) |
Effects: Assigns the the range [first, last) to *this. More... | |
void | assign (std::initializer_list< Value > il) |
Effects: Assigns the the range [il.begin(), il.end()) to *this. More... | |
void | assign (FwdIt first, FwdIt last BOOST_CONTAINER_DOCIGN(BOOST_CONTAINER_I typename container_detail::enable_if_c< !container_detail::is_convertible< FwdIt BOOST_CONTAINER_I size_type >::value &&(!container_detail::is_input_iterator< FwdIt >::value &&!container_detail::is_same< alloc_version BOOST_CONTAINER_I allocator_v0 >::value) >::type *=0)) |
Effects: Assigns the the range [first, last) to *this. More... | |
void | assign (size_type n, const value_type &val) |
Effects: Assigns the n copies of val to *this. More... | |
allocator_type | get_allocator () const BOOST_CONTAINER_NOEXCEPT |
Effects: Returns a copy of the internal allocator. More... | |
stored_allocator_type & | get_stored_allocator () BOOST_CONTAINER_NOEXCEPT |
Effects: Returns a reference to the internal allocator. More... | |
const stored_allocator_type & | get_stored_allocator () const BOOST_CONTAINER_NOEXCEPT |
Effects: Returns a reference to the internal allocator. More... | |
iterator | begin () BOOST_CONTAINER_NOEXCEPT |
Effects: Returns an iterator to the first element contained in the vector. More... | |
const_iterator | begin () const BOOST_CONTAINER_NOEXCEPT |
Effects: Returns a const_iterator to the first element contained in the vector. More... | |
iterator | end () BOOST_CONTAINER_NOEXCEPT |
Effects: Returns an iterator to the end of the vector. More... | |
const_iterator | end () const BOOST_CONTAINER_NOEXCEPT |
Effects: Returns a const_iterator to the end of the vector. More... | |
reverse_iterator | rbegin () BOOST_CONTAINER_NOEXCEPT |
Effects: Returns a reverse_iterator pointing to the beginning of the reversed vector. More... | |
const_reverse_iterator | rbegin () const BOOST_CONTAINER_NOEXCEPT |
Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed vector. More... | |
reverse_iterator | rend () BOOST_CONTAINER_NOEXCEPT |
Effects: Returns a reverse_iterator pointing to the end of the reversed vector. More... | |
const_reverse_iterator | rend () const BOOST_CONTAINER_NOEXCEPT |
Effects: Returns a const_reverse_iterator pointing to the end of the reversed vector. More... | |
const_iterator | cbegin () const BOOST_CONTAINER_NOEXCEPT |
Effects: Returns a const_iterator to the first element contained in the vector. More... | |
const_iterator | cend () const BOOST_CONTAINER_NOEXCEPT |
Effects: Returns a const_iterator to the end of the vector. More... | |
const_reverse_iterator | crbegin () const BOOST_CONTAINER_NOEXCEPT |
Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed vector. More... | |
const_reverse_iterator | crend () const BOOST_CONTAINER_NOEXCEPT |
Effects: Returns a const_reverse_iterator pointing to the end of the reversed vector. More... | |
bool | empty () const BOOST_CONTAINER_NOEXCEPT |
Effects: Returns true if the vector contains no elements. More... | |
size_type | size () const BOOST_CONTAINER_NOEXCEPT |
Effects: Returns the number of the elements contained in the vector. More... | |
size_type | max_size () const BOOST_CONTAINER_NOEXCEPT |
Effects: Returns the largest possible size of the vector. More... | |
void | resize (size_type new_size) |
Effects: Inserts or erases elements at the end such that the size becomes n. More... | |
void | resize (size_type new_size, default_init_t) |
Effects: Inserts or erases elements at the end such that the size becomes n. More... | |
void | resize (size_type new_size, const Value &x) |
Effects: Inserts or erases elements at the end such that the size becomes n. More... | |
size_type | capacity () const BOOST_CONTAINER_NOEXCEPT |
Effects: Number of elements for which memory has been allocated. More... | |
void | reserve (size_type new_cap) |
Effects: If n is less than or equal to capacity(), this call has no effect. More... | |
void | shrink_to_fit () |
Effects: Tries to deallocate the excess of memory created with previous allocations. More... | |
reference | front () BOOST_CONTAINER_NOEXCEPT |
Requires: !empty() More... | |
const_reference | front () const BOOST_CONTAINER_NOEXCEPT |
Requires: !empty() More... | |
reference | back () BOOST_CONTAINER_NOEXCEPT |
Requires: !empty() More... | |
const_reference | back () const BOOST_CONTAINER_NOEXCEPT |
Requires: !empty() More... | |
reference | operator[] (size_type n) BOOST_CONTAINER_NOEXCEPT |
Requires: size() > n. More... | |
const_reference | operator[] (size_type n) const BOOST_CONTAINER_NOEXCEPT |
Requires: size() > n. More... | |
reference | at (size_type n) |
Requires: size() > n. More... | |
const_reference | at (size_type n) const |
Requires: size() > n. More... | |
Value * | data () BOOST_CONTAINER_NOEXCEPT |
Returns: Allocator pointer such that [data(),data() + size()) is a valid range. More... | |
const Value * | data () const BOOST_CONTAINER_NOEXCEPT |
Returns: Allocator pointer such that [data(),data() + size()) is a valid range. More... | |
iterator | insert (const_iterator p, size_type n, const Value &x) |
Requires: p must be a valid iterator of *this. More... | |
iterator | insert (const_iterator pos, InIt first, InIt last BOOST_CONTAINER_DOCIGN(BOOST_CONTAINER_I typename container_detail::enable_if_c< !container_detail::is_convertible< InIt BOOST_CONTAINER_I size_type >::value &&container_detail::is_input_iterator< InIt >::value >::type *=0)) |
Requires: p must be a valid iterator of *this. More... | |
iterator | insert (const_iterator pos, FwdIt first, FwdIt last, typename container_detail::enable_if_c< !container_detail::is_convertible< FwdIt, size_type >::value &&!container_detail::is_input_iterator< FwdIt >::value >::type *=0) |
iterator | insert (const_iterator pos, size_type num, InIt first, InIt last) |
Requires: p must be a valid iterator of *this. More... | |
iterator | insert (const_iterator position, std::initializer_list< value_type > il) |
Requires: position must be a valid iterator of *this. More... | |
void | pop_back () BOOST_CONTAINER_NOEXCEPT |
Effects: Removes the last element from the vector. More... | |
iterator | erase (const_iterator position) |
Effects: Erases the element at position pos. More... | |
iterator | erase (const_iterator first, const_iterator last) |
Effects: Erases the elements pointed by [first, last). More... | |
void | swap (vector &x) BOOST_CONTAINER_NOEXCEPT_IF((!container_detail |
Effects: Swaps the contents of *this and x. More... | |
void | swap (vector< Value, OtherAllocator > &x, typename container_detail::enable_if_c< container_detail::is_version< OtherAllocator, 0 >::value &&!container_detail::is_same< OtherAllocator, allocator_type >::value >::type *=0) |
Effects: Swaps the contents of *this and x. More... | |
void | clear () BOOST_CONTAINER_NOEXCEPT |
Effects: Erases all the elements of the vector. More... | |
bool | stable_reserve (size_type new_cap) |
Effects: If n is less than or equal to capacity(), this call has no effect. More... | |
void | insert_ordered_at (const size_type element_count, BiDirPosConstIt last_position_it, BiDirValueIt last_value_it) |
Friends | |
template<class U , std::size_t OtherCapacity> | |
class | static_vector |
void | swap (static_vector &x, static_vector &y) |
A variable-size array container with fixed capacity.
static_vector is a sequence container like boost::container::vector with contiguous storage that can change in size, along with the static allocation, low overhead, and fixed capacity of boost::array.
A static_vector is a sequence that supports random access to elements, constant time insertion and removal of elements at the end, and linear time insertion and removal of elements at the beginning or in the middle. The number of elements in a static_vector may vary dynamically up to a fixed capacity because elements are stored within the object itself similarly to an array. However, objects are initialized as they are inserted into static_vector unlike C arrays or std::array which must construct all elements on instantiation. The behavior of static_vector enables the use of statically allocated elements in cases with complex object lifetime requirements that would otherwise not be trivially possible.
std::out_of_range is thrown if out of bound access is performed in at()
if exceptions are enabled, throw_out_of_range() if not enabled.
Value | The type of element that will be stored. |
Capacity | The maximum number of elements static_vector can store, fixed at compile time. |
|
inherited |
typedef base_t::const_iterator boost::container::static_vector< Value, Capacity >::const_iterator |
The const iterator type.
typedef base_t::const_pointer boost::container::static_vector< Value, Capacity >::const_pointer |
The const pointer type.
typedef base_t::const_reference boost::container::static_vector< Value, Capacity >::const_reference |
The value const reference type.
typedef base_t::const_reverse_iterator boost::container::static_vector< Value, Capacity >::const_reverse_iterator |
The const reverse iterator.
typedef base_t::difference_type boost::container::static_vector< Value, Capacity >::difference_type |
The pointers difference type.
typedef base_t::iterator boost::container::static_vector< Value, Capacity >::iterator |
The iterator type.
typedef base_t::pointer boost::container::static_vector< Value, Capacity >::pointer |
The pointer type.
typedef base_t::reference boost::container::static_vector< Value, Capacity >::reference |
The value reference type.
typedef base_t::reverse_iterator boost::container::static_vector< Value, Capacity >::reverse_iterator |
The reverse iterator type.
typedef base_t::size_type boost::container::static_vector< Value, Capacity >::size_type |
The unsigned integral type used by the container.
|
inherited |
typedef base_t::value_type boost::container::static_vector< Value, Capacity >::value_type |
The type of elements stored in the container.
|
inline |
|
inlineexplicit |
Constructs a static_vector containing count value initialized values.
count <= capacity()
count | The number of values which will be contained in the container. |
|
inline |
Constructs a static_vector containing count default initialized values.
count <= capacity()
count | The number of values which will be contained in the container. |
|
inline |
Constructs a static_vector containing count copies of value.
count <= capacity()
count | The number of copies of a values that will be contained in the container. |
value | The value which will be used to copy construct values. |
|
inline |
Constructs a static_vector containing copy of a range [first, last)
.
distance(first, last) <= capacity()
ForwardTraversalIterator
concept.first | The iterator to the first element in range. |
last | The iterator to the one after the last element in range. |
|
inline |
Constructs a static_vector containing copy of a range [il.begin(), il.end())
.
distance(il.begin(), il.end()) <= capacity()
il | std::initializer_list with values to initialize vector. |
|
inline |
Constructs a copy of other static_vector.
other | The static_vector which content will be copied to this one. |
|
inline |
Constructs a copy of other static_vector.
other.size() <= capacity()
.other | The static_vector which content will be copied to this one. |
|
inline |
Move constructor.
Moves Values stored in the other static_vector to this one.
other | The static_vector which content will be moved to this one. |
boost::has_nothrow_move<Value>::value
is true
and Value's move constructor throws. boost::has_nothrow_move<Value>::value
is false
and Value's copy constructor throws.
|
inline |
Move constructor. Moves Values stored in the other static_vector to this one.
other.size() <= capacity()
other | The static_vector which content will be moved to this one. |
boost::has_nothrow_move<Value>::value
is true
and Value's move constructor throws. boost::has_nothrow_move<Value>::value
is false
and Value's copy constructor throws.
|
inlineinherited |
Effects: Assigns the the range [first, last) to *this.
Throws: If memory allocation throws or T's copy/move constructor/assignment or T's constructor/assignment from dereferencing InpIt throws.
Complexity: Linear to n.
References boost::container::vector< T, BOOST_CONTAINER_DOCONLY >::begin(), boost::container::vector< T, BOOST_CONTAINER_DOCONLY >::cend(), boost::container::vector< T, BOOST_CONTAINER_DOCONLY >::end(), boost::xpressive::first, boost::container::vector< T, BOOST_CONTAINER_DOCONLY >::insert(), boost::last, boost::n, and boost::interprocess::to_raw_pointer().
|
inlineinherited |
Effects: Assigns the the range [il.begin(), il.end()) to *this.
Throws: If memory allocation throws or T's constructor from dereferencing iniializer_list iterator throws.
|
inlineinherited |
Effects: Assigns the the range [first, last) to *this.
Throws: If memory allocation throws or T's copy/move constructor/assignment or T's constructor/assignment from dereferencing InpIt throws.
Complexity: Linear to n.
References boost::container::vector< T, BOOST_CONTAINER_DOCONLY >::begin(), boost::container::vector< T, BOOST_CONTAINER_DOCONLY >::capacity(), boost::fusion::distance(), boost::container::vector< T, BOOST_CONTAINER_DOCONLY >::end(), boost::xpressive::first, boost::last, and boost::container::vector< T, BOOST_CONTAINER_DOCONLY >::size().
|
inlineinherited |
Effects: Assigns the n copies of val to *this.
Throws: If memory allocation throws or T's copy/move constructor/assignment throws.
Complexity: Linear to n.
References boost::container::vector< T, BOOST_CONTAINER_DOCONLY >::assign().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Requires: !empty()
Effects: Returns a reference to the last element of the container.
Throws: Nothing.
Complexity: Constant.
|
inlineinherited |
Requires: !empty()
Effects: Returns a const reference to the last element of the container.
Throws: Nothing.
Complexity: Constant.
|
inlineinherited |
Effects: Returns an iterator to the first element contained in the vector.
Throws: Nothing.
Complexity: Constant.
|
inlineinherited |
Effects: Returns a const_iterator to the first element contained in the vector.
Throws: Nothing.
Complexity: Constant.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inlineinherited |
Effects: Number of elements for which memory has been allocated.
capacity() is always greater than or equal to size().
Throws: Nothing.
Complexity: Constant.
|
inlineinherited |
Effects: Returns a const_iterator to the first element contained in the vector.
Throws: Nothing.
Complexity: Constant.
|
inlineinherited |
Effects: Returns a const_iterator to the end of the vector.
Throws: Nothing.
Complexity: Constant.
|
inlineinherited |
Effects: Erases all the elements of the vector.
Throws: Nothing.
Complexity: Linear to the number of elements in the container.
|
inlineinherited |
Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed vector.
Throws: Nothing.
Complexity: Constant.
References boost::container::vector< T, BOOST_CONTAINER_DOCONLY >::end().
|
inlineinherited |
Effects: Returns a const_reverse_iterator pointing to the end of the reversed vector.
Throws: Nothing.
Complexity: Constant.
References boost::container::vector< T, BOOST_CONTAINER_DOCONLY >::begin().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Effects: Returns true if the vector contains no elements.
Throws: Nothing.
Complexity: Constant.
|
inlineinherited |
Effects: Returns an iterator to the end of the vector.
Throws: Nothing.
Complexity: Constant.
|
inlineinherited |
Effects: Returns a const_iterator to the end of the vector.
Throws: Nothing.
Complexity: Constant.
References boost::container::vector< T, BOOST_CONTAINER_DOCONLY >::cend().
|
inlineinherited |
Effects: Erases the element at position pos.
Throws: Nothing.
Complexity: Linear to the elements between pos and the last element. Constant if pos is the last element.
References boost::fusion::move(), boost::multiprecision::backends::p, boost::interprocess::to_raw_pointer(), and boost::container::vector_iterator_get_ptr().
|
inlineinherited |
Effects: Erases the elements pointed by [first, last).
Throws: Nothing.
Complexity: Linear to the distance between first and last plus linear to the elements between pos and the last element.
References boost::move(), boost::python::ptr(), boost::interprocess::to_raw_pointer(), and boost::container::vector_iterator_get_ptr().
|
inlineinherited |
Requires: !empty()
Effects: Returns a reference to the first element of the container.
Throws: Nothing.
Complexity: Constant.
|
inlineinherited |
Requires: !empty()
Effects: Returns a const reference to the first element of the container.
Throws: Nothing.
Complexity: Constant.
|
inlineinherited |
Effects: Returns a copy of the internal allocator.
Throws: If allocator's copy constructor throws.
Complexity: Constant.
|
inlineinherited |
Effects: Returns a reference to the internal allocator.
Throws: Nothing
Complexity: Constant.
Note: Non-standard extension.
|
inlineinherited |
Effects: Returns a reference to the internal allocator.
Throws: Nothing
Complexity: Constant.
Note: Non-standard extension.
|
inlineinherited |
Requires: p must be a valid iterator of *this.
Effects: Insert n copies of x before pos.
Returns: an iterator to the first inserted element or p if n is 0.
Throws: If memory allocation throws or T's copy/move constructor throws.
Complexity: Linear to n.
References boost::container::vector_iterator_get_ptr().
|
inlineinherited |
Requires: p must be a valid iterator of *this.
Effects: Insert a copy of the [first, last) range before pos.
Returns: an iterator to the first inserted element or pos if first == last.
Throws: If memory allocation throws, T's constructor from a dereferenced InpIt throws or T's copy/move constructor/assignment throws.
Complexity: Linear to std::distance [first, last).
References boost::container::vector< T, BOOST_CONTAINER_DOCONLY >::cbegin(), boost::xpressive::first, boost::it, boost::last, and boost::container::vector_iterator_get_ptr().
|
inlineinherited |
References boost::fusion::distance(), and boost::container::vector_iterator_get_ptr().
|
inlineinherited |
Requires: p must be a valid iterator of *this.
num, must be equal to std::distance(first, last)
Effects: Insert a copy of the [first, last) range before pos.
Returns: an iterator to the first inserted element or pos if first == last.
Throws: If memory allocation throws, T's constructor from a dereferenced InpIt throws or T's copy/move constructor/assignment throws.
Complexity: Linear to std::distance [first, last).
Note: This function avoids a linear operation to calculate std::distance[first, last) for forward and bidirectional iterators, and a one by one insertion for input iterators. This is a a non-standard extension.
References BOOST_ASSERT, boost::fusion::distance(), boost::program_options::value(), boost::container::vector_iterator_get_ptr(), and boost::detail::void.
|
inlineinherited |
Requires: position must be a valid iterator of *this.
Effects: Insert a copy of the [il.begin(), il.end()) range before position.
Returns: an iterator to the first inserted element or position if first == last.
Complexity: Linear to the range [il.begin(), il.end()).
|
inlineinherited |
|
inlineinherited |
Effects: Returns the largest possible size of the vector.
Throws: Nothing.
Complexity: Constant.
References boost::container::allocator_traits< Allocator >::max_size().
|
inline |
Copy assigns Values stored in the other static_vector to this one.
other | The static_vector which content will be copied to this one. |
|
inline |
Copy assigns Values stored in std::initializer_list to *this.
il | The std::initializer_list which content will be copied to this one. |
|
inline |
Copy assigns Values stored in the other static_vector to this one.
other.size() <= capacity()
other | The static_vector which content will be copied to this one. |
References boost::detail::const, and boost::spirit::x3::unicode::other.
|
inline |
Move assignment.
Moves Values stored in the other static_vector to this one.
other | The static_vector which content will be moved to this one. |
boost::has_nothrow_move<Value>::value
is true
and Value's move constructor or move assignment throws. boost::has_nothrow_move<Value>::value
is false
and Value's copy constructor or copy assignment throws.References boost::move(), and boost::container::vector< Value, container_detail::static_storage_allocator< Value, Capacity > >::operator=().
|
inline |
Move assignment. Moves Values stored in the other static_vector to this one.
other.size() <= capacity()
other | The static_vector which content will be moved to this one. |
boost::has_nothrow_move<Value>::value
is true
and Value's move constructor or move assignment throws. boost::has_nothrow_move<Value>::value
is false
and Value's copy constructor or copy assignment throws.References boost::move().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Effects: Removes the last element from the vector.
Throws: Nothing.
Complexity: Constant time.
|
inlineinherited |
Effects: Returns a reverse_iterator pointing to the beginning of the reversed vector.
Throws: Nothing.
Complexity: Constant.
References boost::container::vector< T, BOOST_CONTAINER_DOCONLY >::end().
|
inlineinherited |
Effects: Returns a const_reverse_iterator pointing to the beginning of the reversed vector.
Throws: Nothing.
Complexity: Constant.
References boost::container::vector< T, BOOST_CONTAINER_DOCONLY >::crbegin().
|
inlineinherited |
Effects: Returns a reverse_iterator pointing to the end of the reversed vector.
Throws: Nothing.
Complexity: Constant.
References boost::container::vector< T, BOOST_CONTAINER_DOCONLY >::begin().
|
inlineinherited |
Effects: Returns a const_reverse_iterator pointing to the end of the reversed vector.
Throws: Nothing.
Complexity: Constant.
References boost::container::vector< T, BOOST_CONTAINER_DOCONLY >::crend().
|
inlineinherited |
Effects: If n is less than or equal to capacity(), this call has no effect.
Otherwise, it is a request for allocation of additional memory. If the request is successful, then capacity() is greater than or equal to n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
Throws: If memory allocation allocation throws or T's copy/move constructor throws.
References boost::container::vector< T, BOOST_CONTAINER_DOCONLY >::capacity().
|
inlineinherited |
Effects: Inserts or erases elements at the end such that the size becomes n.
New elements are value initialized.
Throws: If memory allocation throws, or T's copy/move or value initialization throws.
Complexity: Linear to the difference between size() and new_size.
|
inlineinherited |
Effects: Inserts or erases elements at the end such that the size becomes n.
New elements are default initialized.
Throws: If memory allocation throws, or T's copy/move or default initialization throws.
Complexity: Linear to the difference between size() and new_size.
Note: Non-standard extension
|
inlineinherited |
Effects: Inserts or erases elements at the end such that the size becomes n.
New elements are copy constructed from x.
Throws: If memory allocation throws, or T's copy/move constructor throws.
Complexity: Linear to the difference between size() and new_size.
|
inlineinherited |
Effects: Tries to deallocate the excess of memory created with previous allocations.
The size of the vector is unchanged
Throws: If memory allocation throws, or T's copy/move constructor throws.
Complexity: Linear to size().
|
inlineinherited |
Effects: Returns the number of the elements contained in the vector.
Throws: Nothing.
Complexity: Constant.
|
inlineinherited |
Effects: If n is less than or equal to capacity(), this call has no effect.
Otherwise, it is a request for allocation of additional memory (memory expansion) that will not invalidate iterators. If the request is successful, then capacity() is greater than or equal to n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
Throws: If memory allocation allocation throws or T's copy/move constructor throws.
Note: Non-standard extension.
|
inlineinherited |
Effects: Swaps the contents of *this and x.
Throws: Nothing.
Complexity: Constant.
|
inlineinherited |
Effects: Swaps the contents of *this and x.
Throws: Nothing.
Complexity: Linear
Note: Non-standard extension to support static_vector
|
friend |
|
friend |