|
constexpr auto | back () const noexcept -> const_reference |
| Accesses the last item.
|
|
constexpr auto | back () noexcept -> reference |
| Accesses the last item.
|
|
constexpr auto | begin () const noexcept -> const_iterator |
| Returns an iterator to the beginning.
|
|
constexpr auto | begin () noexcept -> iterator |
| Returns an iterator to the beginning.
|
|
constexpr auto | cbegin () const noexcept -> const_iterator |
| Returns an const iterator to the beginning.
|
|
constexpr auto | cend () const noexcept -> const_iterator |
| Returns an const iterator to the end.
|
|
constexpr auto | crbegin () const noexcept -> const_reverse_iterator |
| Returns a reverse iterator to the first element of the reversed array. It corresponds to the last element of the non-reversed array. If the array is empty, the returned iterator is equal to rend().
|
|
constexpr auto | crend () const noexcept -> const_reverse_iterator |
| Returns a reverse iterator to the element following the last element of the reversed array. It corresponds to the element preceding the first element of the non-reversed array. This element acts as a placeholder, attempting to access it results in undefined behavior.
|
|
constexpr auto | data () const noexcept -> const_pointer |
| Returns pointer to the underlying array serving as element storage. The pointer is such that range [data(); data() + size()) is always a valid range, even if the container is empty (data() is not dereferenceable in that case).
|
|
constexpr auto | data () noexcept -> pointer |
| Returns pointer to the underlying array serving as element storage. The pointer is such that range [data(); data() + size()) is always a valid range, even if the container is empty (data() is not dereferenceable in that case).
|
|
constexpr auto | empty () const noexcept -> bool |
| Checks if the container has no elements, i.e. whether begin() == end().
|
|
constexpr auto | end () const noexcept -> const_iterator |
| Returns an iterator to the end.
|
|
constexpr auto | end () noexcept -> iterator |
| Returns an iterator to the end.
|
|
constexpr auto | fill (const_reference value) -> void |
| Assigns the given value value to all elements in the container.
|
|
constexpr auto | front () const noexcept -> const_reference |
| Accesses the first item.
|
|
constexpr auto | front () noexcept -> reference |
| Accesses the first item.
|
|
constexpr auto | max_size () const noexcept -> size_type |
| Returns the maximum number of elements the container is able to hold due to system or library implementation limitations, i.e. distance(begin(), end()) for the largest container.
|
|
constexpr auto | operator[] (size_type const pos) const noexcept -> const_reference |
| Accesses the specified item with range checking.
|
|
constexpr auto | operator[] (size_type const pos) noexcept -> reference |
| Accesses the specified item with range checking.
|
|
constexpr auto | rbegin () const noexcept -> const_reverse_iterator |
| Returns a reverse iterator to the first element of the reversed array. It corresponds to the last element of the non-reversed array. If the array is empty, the returned iterator is equal to rend().
|
|
constexpr auto | rbegin () noexcept -> reverse_iterator |
| Returns a reverse iterator to the first element of the reversed array. It corresponds to the last element of the non-reversed array. If the array is empty, the returned iterator is equal to rend().
|
|
constexpr auto | rend () const noexcept -> const_reverse_iterator |
| Returns a reverse iterator to the element following the last element of the reversed array. It corresponds to the element preceding the first element of the non-reversed array. This element acts as a placeholder, attempting to access it results in undefined behavior.
|
|
constexpr auto | rend () noexcept -> reverse_iterator |
| Returns a reverse iterator to the element following the last element of the reversed array. It corresponds to the element preceding the first element of the non-reversed array. This element acts as a placeholder, attempting to access it results in undefined behavior.
|
|
constexpr auto | size () const noexcept -> size_type |
| Returns the number of elements in the container, i.e. distance(begin(), end()).
|
|
constexpr auto | swap (array &other) noexcept(is_nothrow_swappable_v< Type >) -> void |
| Exchanges the contents of the container with those of other. Does not cause iterators and references to associate with the other container.
|
|
|
(Note that these are not member symbols.)
|
template<typename T , typename... U> |
| array (T, U...) -> array< T, 1+sizeof...(U)> |
| One deduction guide is provided for array to provide an equivalent of experimental::make_array for construction of array from a variadic parameter pack. The program is ill-formed if (is_same_v<T, U> and ...) is not true. Note that it is true when sizeof...(U) is zero.
|
|
template<size_t Index, typename T , size_t Size> |
constexpr auto | get (array< T, Size > &&array) noexcept -> T && |
|
template<size_t Index, typename T , size_t Size> |
constexpr auto | get (array< T, Size > &array) noexcept -> T & |
| Extracts the Ith element element from the array. I must be an integer value in range [0, N). This is enforced at compile time as opposed to at() or operator[].
|
|
template<size_t Index, typename T , size_t Size> |
constexpr auto | get (array< T, Size > const &&array) noexcept -> T const && |
|
template<size_t Index, typename T , size_t Size> |
constexpr auto | get (array< T, Size > const &array) noexcept -> T const & |
|
template<typename T , etl::size_t Size> |
constexpr auto | is_tuple_like |
|
template<typename T , size_t N> |
constexpr auto | to_array (T(&&a)[N]) |
|
template<typename T , size_t N> |
constexpr auto | to_array (T(&a)[N]) -> array< remove_cv_t< T >, N > |
| Creates a array from the one dimensional built-in array a. The elements of the array are copy-initialized from the corresponding element of a. Copying or moving multidimensional built-in array is not supported.
|
|
A container that encapsulates fixed size arrays.
This container is an aggregate type with the same semantics as a struct holding a C-style array Type[N] as its only non-static data member. Unlike a C-style array, it doesn't decay to Type* automatically. As an aggregate type, it can be initialized with aggregate-initialization given at most N initializers that are convertible to Type: array<int, 3> a = {1,2,3};
#if defined(TETL_ENABLE_CXX_MODULES)
import etl;
#else
#endif
{
etl::copy(src.begin(), src.end(), dest.begin());
return 0;
}
#define assert(...)
Definition cassert.hpp:20
constexpr auto all_of(InputIt first, InputIt last, Predicate p) -> bool
Checks if unary predicate p returns true for all elements in the range [first, last).
Definition all_of.hpp:16
constexpr auto copy(InputIt first, InputIt last, OutputIt destination) -> OutputIt
Copies the elements in the range, defined by [first, last), to another range beginning at destination...
Definition copy.hpp:19
A container that encapsulates fixed size arrays.
Definition array.hpp:49
The class template bitset represents a fixed-size sequence of Bits bits. Bitsets can be manipulated b...
Definition bitset.hpp:23
- Examples
- array.cpp, and set.cpp.