|
| constexpr | inline_vector ()=default |
| | Construct an empty vector.
|
| |
| constexpr | inline_vector (inline_vector &&)=default |
| | Default move constructor.
|
| |
| constexpr | inline_vector (inline_vector const &)=default |
| | Default copy constructor.
|
| |
| template<size_type OtherCapacity, constraints< std::enable_if_t< OtherCapacity !=Capacity > > = nullptr> |
| constexpr | inline_vector (inline_vector< T, OtherCapacity > &&other) noexcept(std::is_nothrow_move_constructible< T >::value) |
| | Move construct from a vector with a different capacity.
|
| |
| template<size_type OtherCapacity, typename U = T, constraints< std::enable_if_t< std::is_same< U, T >::value >, std::enable_if_t< std::is_copy_constructible< U >::value >, std::enable_if_t< OtherCapacity !=Capacity > > = nullptr> |
| constexpr | inline_vector (inline_vector< T, OtherCapacity > const &other) noexcept(std::is_nothrow_copy_constructible< T >::value) |
| | Copy construct from a vector with a different capacity.
|
| |
| | ~inline_vector ()=default |
| | Default destructor.
|
| |
| constexpr auto | operator= (inline_vector &&) -> inline_vector &=default |
| | Default move assignment.
|
| |
| constexpr auto | operator= (inline_vector const &) -> inline_vector &=default |
| | Default copy assignment.
|
| |
| template<size_type OtherCapacity, constraints< std::enable_if_t< OtherCapacity !=Capacity > > = nullptr> |
| auto | operator= (inline_vector< T, OtherCapacity > &&other) noexcept(std::is_nothrow_move_constructible< T >::value &&std::is_nothrow_move_assignable< T >::value) -> inline_vector & |
| | Move-assign to the vector from the elements of a vector with a different capacity. Assigns over existing elements, constructs additional elements, and destroys any excess.
|
| |
| template<typename U = T, size_type OtherCapacity, constraints< std::enable_if_t< OtherCapacity !=Capacity >, std::enable_if_t< std::is_copy_constructible< U >::value >, std::enable_if_t< std::is_copy_assignable< U >::value > > = nullptr> |
| auto | operator= (inline_vector< U, OtherCapacity > const &other) noexcept(std::is_nothrow_copy_constructible< U >::value &&std::is_nothrow_copy_assignable< U >::value) -> inline_vector & |
| | Copy-assign to the vector from the elements of a vector with a different capacity. Assigns over existing elements, constructs additional elements, and destroys any excess.
|
| |
| auto | operator= (std::initializer_list< T > source_values) noexcept(std::is_nothrow_copy_constructible< T >::value &&std::is_nothrow_copy_assignable< T >::value) -> inline_vector & |
| | Assign to the vector from the elements of an initializer list. Assigns over existing elements, constructs additional elements, and destroys any excess.
|
| |
| template<typename U = value_type, constraints< std::enable_if_t< is_swappable_v< U > > > = nullptr> |
| constexpr void | swap (inline_vector &other) noexcept(is_nothrow_swappable_v< value_type > &&std::is_nothrow_move_constructible< value_type >::value) |
| | swaps all the elements between this vector and another.
|
| |
|
| static constexpr auto | try_construct () noexcept -> optional< inline_vector > |
| | Default construct a vector.
|
| |
| template<typename Container, constraints< std::enable_if_t< std::is_constructible< inline_vector, Container && >::value >, std::enable_if_t< inline_vector_detail::is_inline_vector_of_t_v< T, Container > > > = nullptr> |
| static constexpr auto | try_construct (Container &&container) noexcept(std::is_nothrow_constructible< inline_vector, Container && >::value) -> optional< inline_vector > |
| | Construct a vector initialized with the specified paramters.
|
| |
| template<typename Container, constraints< std::enable_if_t< std::is_constructible< inline_vector, Container const & >::value >, std::enable_if_t< inline_vector_detail::is_inline_vector_of_t_v< T, Container > > > = nullptr> |
| static constexpr auto | try_construct (Container const &container) noexcept(std::is_nothrow_constructible< inline_vector, Container const & >::value) -> optional< inline_vector > |
| | Construct a vector initialized with the specified paramters.
|
| |
| template<typename Iterator, typename U = T, constraints< std::enable_if_t< is_bidirectional_iterator_v< Iterator > >, std::enable_if_t< std::is_same< U, T >::value >, std::enable_if_t< std::is_constructible< U, typename std::iterator_traits< Iterator >::reference >::value > > = nullptr> |
| static constexpr auto | try_construct (Iterator first, Iterator last) noexcept(denotes_nothrow_iterable_range_v< Iterator > &&std::is_nothrow_constructible< T, typename std::iterator_traits< Iterator >::reference >::value) -> optional< inline_vector > |
| | Construct a vector from a bidrectional iterator range.
|
| |
| template<typename Iterator, typename U = T, constraints< std::enable_if_t< is_input_iterator_v< Iterator > >, std::enable_if_t<!is_bidirectional_iterator_v< Iterator > >, std::enable_if_t< std::is_same< U, T >::value >, std::enable_if_t< std::is_constructible< U, typename std::iterator_traits< Iterator >::reference >::value > > = nullptr> |
| static constexpr auto | try_construct (Iterator first, Iterator last) noexcept(denotes_nothrow_iterable_range_v< Iterator > &&std::is_nothrow_constructible< T, typename std::iterator_traits< Iterator >::reference >::value) -> optional< inline_vector > |
| | Construct a vector from an input iterator range.
|
| |
| template<typename U = T, constraints< std::enable_if_t< std::is_same< U, T >::value >, std::enable_if_t< std::is_default_constructible< U >::value > > = nullptr> |
| static constexpr auto | try_construct (size_type count) noexcept(std::is_nothrow_default_constructible< T >::value) -> optional< inline_vector > |
| | Construct a vector with the specified number of default-constructed elements.
|
| |
| template<typename U = T, constraints< std::enable_if_t< std::is_same< U, T >::value >, std::enable_if_t< std::is_copy_constructible< U >::value > > = nullptr> |
| static constexpr auto | try_construct (size_type count, T const &source) noexcept(std::is_nothrow_copy_constructible< T >::value) -> optional< inline_vector > |
| | Construct a vector with the specified number of elements copied from the provided source.
|
| |
| template<typename InitElement, constraints< std::enable_if_t< std::is_constructible< inline_vector, typename std::initializer_list< InitElement >::const_iterator, typename std::initializer_list< InitElement >::const_iterator >::value > > = nullptr> |
| static constexpr auto | try_construct (std::initializer_list< InitElement > const &init_list) noexcept(std::is_nothrow_constructible< inline_vector, typename std::initializer_list< InitElement >::const_iterator, typename std::initializer_list< InitElement >::const_iterator >::value) -> optional< inline_vector > |
| | Construct a vector initialized with the specified parameters.
|
| |
template<typename T,
std::size_t Capacity>
class arene::base::inline_vector< T, Capacity >
A container similar to std::vector<T> that has a fixed capacity. The storage for the elements is held directly within the class. Any attempt to store more than Capacity elements will throw std::length_error.
- Template Parameters
-
| T | The type of each element |
| Capacity | The maximum number of elements that can be stored. |