![]() |
Arene Base
Fundamental Utilities For Safety Critical C++
|
a container similar to std::vector<T> that uses an external buffer for storage
More...

Public Member Functions | |
| external_vector () noexcept | |
construct an empty external_vector | |
| external_vector (external_vector &&other) noexcept | |
construct an external_vector from another external_vector | |
| external_vector (external_vector const &)=delete | |
| deleted copy constructor | |
| external_vector (span< byte > buffer) noexcept | |
construct an empty external_vector | |
| template<class U = value_type, constraints< std::enable_if_t< std::is_move_constructible< U >::value > > = nullptr> | |
| external_vector (span< byte > buffer, external_vector &&other) noexcept(std::is_nothrow_move_constructible< value_type >::value) | |
construct an external_vector from another external_vector | |
| template<class U = value_type, constraints< std::enable_if_t< std::is_copy_constructible< U >::value > > = nullptr> | |
| external_vector (span< byte > buffer, external_vector const &other) noexcept(std::is_nothrow_copy_constructible< value_type >::value) | |
construct an external_vector from another external_vector | |
| template<class I, constraints< std::enable_if_t< is_input_iterator_v< I > >, std::enable_if_t< std::is_constructible< value_type, typename std::iterator_traits< I >::reference >::value > > = nullptr> | |
| external_vector (span< byte > buffer, I first, I last) noexcept(denotes_nothrow_iterable_range_v< I > &&std::is_nothrow_constructible< value_type, typename std::iterator_traits< I >::reference >::value) | |
construct an external_vector from a range | |
| template<class U = value_type, constraints< std::enable_if_t< std::is_default_constructible< U >::value > > = nullptr> | |
| external_vector (span< byte > buffer, size_type count) noexcept(std::is_nothrow_default_constructible< value_type >::value) | |
construct an external_vector with default constructed values | |
| template<class U = value_type, constraints< std::enable_if_t< std::is_copy_constructible< U >::value > > = nullptr> | |
| external_vector (span< byte > buffer, size_type count, value_type const &value) noexcept(std::is_nothrow_copy_constructible< value_type >::value) | |
construct an external_vector with copies of a value | |
| template<class U = value_type, constraints< std::enable_if_t< std::is_copy_constructible< U >::value > > = nullptr> | |
| external_vector (span< byte > buffer, std::initializer_list< value_type > init_list) noexcept(std::is_nothrow_copy_constructible< value_type >::value) | |
construct an external_vector from a list of values | |
| ~external_vector ()=default | |
| default destructor | |
| auto | operator= (enable_if_assignable_t< false, value_type && >) -> external_vector &=delete |
| deleted move assignment operator | |
| auto | operator= (enable_if_assignable_t< false, value_type const & >) -> external_vector &=delete |
| deleted copy assignment operator | |
| auto | operator= (enable_if_assignable_t< true, value_type && > other) noexcept(std::is_nothrow_move_constructible< value_type >::value &&std::is_nothrow_move_assignable< value_type >::value) -> external_vector & |
| move assignment operator | |
| auto | operator= (enable_if_assignable_t< true, value_type const & > other) noexcept(std::is_nothrow_copy_constructible< value_type >::value &&std::is_nothrow_copy_assignable< value_type >::value) -> external_vector & |
| copy assignment operator | |
| template<class U = value_type, constraints< std::enable_if_t< std::is_copy_constructible< U >::value &&std::is_copy_assignable< U >::value > > = nullptr> | |
| auto | operator= (std::initializer_list< value_type > init_list) noexcept(std::is_nothrow_copy_constructible< value_type >::value &&std::is_nothrow_copy_assignable< value_type >::value) -> external_vector & |
| assignment from a list of values | |
| auto | swap (external_vector &other) noexcept -> void |
swap contents with a different external_vector | |
Static Public Member Functions | |
| static auto | get_storage (typename external_vector_detail::external_storage_base< T >::storage_access_tag, external_vector_detail::external_storage_base< T > *const self) noexcept -> storage_base & |
Internal function to get access to the storage for an external_vector. | |
| static auto | get_storage (typename external_vector_detail::external_storage_base< T >::storage_access_tag, external_vector_detail::external_storage_base< T > const *const self) noexcept -> storage_base const & |
Internal function to get access to the storage for an external_vector. | |
Friends | |
| auto | swap (external_vector &lhs, external_vector &rhs) noexcept -> void |
swaps all the elements between two external_vector values | |
a container similar to std::vector<T> that uses an external buffer for storage
| T | value type of the container |
A container where storage for the values is provided as a buffer, which is external to the class. The lifetime of the external buffer must bound the lifetime of external_vector (i.e. the external buffer must outlive the external_vector that uses it).
|
default |
default destructor
Detroys values stored in the external buffer.
|
inlineexplicitnoexcept |
construct an empty external_vector
| buffer | external buffer of bytes |
buffer matches the alignment of value_type buffer is an exact multiple of sizeof(value_type) size() == 0 capacity() == buffer.size() / sizeof(value_type) Constructs an empty external_vector that is configured to use buffer as external storage.
|
inlinenoexcept |
construct an empty external_vector
size() == 0 capacity() == 0 Constructs an empty external_vector without initializing any external storage.
|
inlinenoexcept |
construct an external_vector from a range
| I | input iterator type |
| buffer | external buffer of bytes |
| first | beginning of the range of values |
| last | end of the range of values |
buffer matches the alignment of value_type buffer is an exact multiple of sizeof(value_type) std::distance(first, last) does not exceed the number of values that can be stored in buffer Constructs an external_vector from range [first, last) .
|
inlinenoexcept |
construct an external_vector with default constructed values
| U | dummy used to constrain this constructor to value types that are default constructible |
| buffer | external buffer of bytes |
| count | size of the external_vector |
buffer matches the alignment of value_type buffer is an exact multiple of sizeof(value_type) count does not exceed the number of values that can be stored in buffer Constructs an external_vector containing count number of default constructed values.
|
inlinenoexcept |
construct an external_vector with copies of a value
| U | dummy used to constrain this constructor to value types that are copy constructible |
| buffer | external buffer of bytes |
| count | size of the external_vector |
| value | value to copy into the external_vector |
buffer matches the alignment of value_type buffer is an exact multiple of sizeof(value_type) count does not exceed the number of values that can be stored in buffer Constructs an external_vector containing count number of copies of value.
|
inlinenoexcept |
construct an external_vector from another external_vector
| U | dummy used to constrain this constructor to value types that are move constructible |
| buffer | external buffer of bytes |
| other | another external_vector |
buffer matches the alignment of value_type buffer is an exact multiple of sizeof(value_type) other.size() does not exceed the number of values that can be stored in buffer buffer does not alias with the buffer managed by other Constructs an external_vector from other, moving values from the external buffer managed by other to buffer.
other is in a valid but unspecified state
|
inlinenoexcept |
construct an external_vector from another external_vector
| U | dummy used to constrain this constructor to value types that are copy constructible |
| buffer | external buffer of bytes |
| other | another external_vector |
buffer matches the alignment of value_type buffer is an exact multiple of sizeof(value_type) other.size() does not exceed the number of values that can be stored in buffer buffer does not alias with the buffer managed by other Constructs an external_vector from other, copying values from the external buffer managed by other to buffer.
std::equal(this->begin(), this->end(), other.begin(), other.end()) is true
|
inlinenoexcept |
construct an external_vector from a list of values
| U | dummy used to constrain this constructor to value types that are copy constructible |
| buffer | external buffer of bytes |
| init_list | values to copy |
buffer matches the alignment of value_type buffer is an exact multiple of sizeof(value_type) init_list.size() does not exceed the number of values that can be stored in buffer Constructs an external_vector with copies of values in init_list.
|
inlinenoexcept |
construct an external_vector from another external_vector
| other | external_vector to move from |
Constructs an external_vector by moving contents from other. This does not invoke any constructors of value_type.
other is in a valid but unspecified state
|
delete |
deleted copy constructor
|
inlinestaticnoexcept |
Internal function to get access to the storage for an external_vector.
| self | The pointer to the internal base class |
|
inlinestaticnoexcept |
Internal function to get access to the storage for an external_vector.
| self | The pointer to the internal base class |
|
delete |
deleted move assignment operator
external_vector&& if std::is_move_constructible<value_type>::value && std::is_move_assignable<value_type>::value is false std::is_move_constructible<value_type>::value && std::is_move_assignable<value_type>::value is false
|
delete |
deleted copy assignment operator
external_vector const& if std::is_copy_constructible<value_type>::value && std::is_copy_assignable<value_type>::value is false std::is_copy_constructible<value_type>::value && std::is_copy_assignable<value_type>::value is false
|
inlinenoexcept |
move assignment operator
| other | external_vector to move values from |
*this Replaces the contents of the container with values from other. The first std::min(size(), other.size()) values are move assigned; remaining values are move constructed.
capacity() <= other.size() other is in a valid but unspecified stateexternal_vector&& if std::is_move_constructible<value_type>::value && std::is_move_assignable<value_type>::value is true std::is_move_constructible<value_type>::value && std::is_move_assignable<value_type>::value is false
|
inlinenoexcept |
copy assignment operator
| other | external_vector to copy values from |
*this Replaces the contents of the container with values from other. The first std::min(size(), other.size()) values are copy assigned; remaining values are copy constructed.
capacity() <= other.size() std::equal(this->begin(), this->end(), other.begin(), other.end()) is true external_vector const& if std::is_copy_constructible<value_type>::value && std::is_copy_assignable<value_type>::value is true std::is_copy_constructible<value_type>::value && std::is_copy_assignable<value_type>::value is false
|
inlinenoexcept |
assignment from a list of values
| U | dummy used to constrain this assignment operator to value types that are copy constructible and copy assignable |
| init_list | values to copy |
*this Replaces the contents of the container with values from other. The first std::min(size(), other.size()) values are copy assigned; remaining values are copy constructed.
capacity() <= other.size() std::equal(this->begin(), this->end(), other.begin(), other.end()) is true
|
inlinenoexcept |
swap contents with a different external_vector
| other | external_vector to swap contents with |
external_vector
|
friend |
swaps all the elements between two external_vector values
| lhs | the left hand vector to swap |
| rhs | the right hand vector to swap |
lhs.swap(rhs);