31#ifndef ETL_ARRAY_WRAPPER_INCLUDED
32#define ETL_ARRAY_WRAPPER_INCLUDED
78 template <
typename T,
size_t SIZE_, T(&ARRAY_)[SIZE_]>
91 typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
92 typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
200 ETL_CONSTEXPR const_iterator cend()
const
208 reverse_iterator rbegin()
210 return reverse_iterator(&ARRAY_[END]);
216 ETL_CONSTEXPR const_reverse_iterator
rbegin()
const
218 return const_reverse_iterator(&
ARRAY_[END]);
224 ETL_CONSTEXPR const_reverse_iterator
crbegin()
const
226 return const_reverse_iterator(&
ARRAY_[END]);
234 return reverse_iterator(&
ARRAY_[BEGIN]);
240 ETL_CONSTEXPR const_reverse_iterator
rend()
const
242 return const_reverse_iterator(&
ARRAY_[BEGIN]);
248 ETL_CONSTEXPR const_reverse_iterator
crend()
const
250 return const_reverse_iterator(&
ARRAY_[BEGIN]);
256 ETL_CONSTEXPR
size_t size()
const
314 template <
typename U, U(&ARRAYOTHER)[SIZE_]>
318 using ETL_OR_STD::swap;
320 for (
size_t i = 0
UL;
i < SIZE; ++
i)
330 template <
typename TL,
typename TR,
size_t SIZEL,
size_t SIZER, TL(&ARRAYL)[SIZEL], TR(&ARRAYR)[SIZER]>
340 template <
typename TL,
typename TR,
size_t SIZEL,
size_t SIZER, TL(&ARRAYL)[SIZEL], TR(&ARRAYR)[SIZER]>
350 template <
typename TL,
typename TR,
size_t SIZEL,
size_t SIZER, TL(&ARRAYL)[SIZEL], TR(&ARRAYR)[SIZER]>
354 return etl::lexicographical_compare(
lhs.begin(),
lhs.end(),
rhs.begin(),
rhs.end());
360 template <
typename TL,
typename TR,
size_t SIZEL,
size_t SIZER, TL(&ARRAYL)[SIZEL], TR(&ARRAYR)[SIZER]>
370 template <
typename TL,
typename TR,
size_t SIZEL,
size_t SIZER, TL(&ARRAYL)[SIZEL], TR(&ARRAYR)[SIZER]>
380 template <
typename TL,
typename TR,
size_t SIZEL,
size_t SIZER, TL(&ARRAYL)[SIZEL], TR(&ARRAYR)[SIZER]>
390#if ETL_USING_8BIT_TYPES
391 template <
typename T,
size_t SIZE, T(&ARRAY)[SIZE]>
392 struct hash<
etl::array_wrapper<T, SIZE, ARRAY> >
396 const uint8_t* pb =
reinterpret_cast<const uint8_t*
>(aw.data());
397 const uint8_t* pe = pb + (SIZE *
sizeof(T));
399 return etl::private_hash::generic_hash<size_t>(pb, pe);
408template <
typename T,
size_t SIZE, T(&ARRAYL)[SIZE], T(&ARRAYR)[SIZE]>
415#define ETL_ARRAY_WRAPPER(arraytype, arrayobject) etl::array_wrapper<arraytype, ETL_ARRAY_SIZE(arrayobject), arrayobject>
The base class for array_wrapper exceptions.
Definition array_wrapper.h:52
Array wrapper.
Definition array_wrapper.h:80
iterator end()
Returns an iterator to the end of the array.
Definition array_wrapper.h:184
ETL_CONSTEXPR const_iterator end() const
Returns a const iterator to the end of the array.
Definition array_wrapper.h:192
ETL_CONSTEXPR const_reverse_iterator rend() const
Returns a const reverse iterator to the end of the array.
Definition array_wrapper.h:240
reference back()
Returns a reference to the last element.
Definition array_wrapper.h:128
ETL_CONSTEXPR const_iterator begin() const
Returns a const iterator to the beginning of the array.
Definition array_wrapper.h:168
iterator begin()
Returns an iterator to the beginning of the array.
Definition array_wrapper.h:160
reference front()
Returns a reference to the first element.
Definition array_wrapper.h:112
ETL_CONSTEXPR const_iterator cbegin() const
Returns a const iterator to the beginning of the array.
Definition array_wrapper.h:176
ETL_CONSTEXPR const_reverse_iterator crend() const
Returns a const reverse iterator to the end of the array.
Definition array_wrapper.h:248
ETL_CONSTEXPR const_reference back() const
Returns a const reference to the last element.
Definition array_wrapper.h:136
ETL_CONSTEXPR const_reference front() const
Returns a const reference to the first element.
Definition array_wrapper.h:120
ETL_CONSTEXPR const_pointer data() const
Returns a const pointer to the first element of the internal storage.
Definition array_wrapper.h:152
void fill(parameter_t value)
Fills the array.
Definition array_wrapper.h:306
ETL_CONSTEXPR const_reference operator[](size_t i) const
Returns a const reference to the indexed value.
Definition array_wrapper.h:280
reference operator[](size_t i)
Returns a reference to the indexed value.
Definition array_wrapper.h:272
pointer data()
Returns a pointer to the first element of the internal storage.
Definition array_wrapper.h:144
ETL_CONSTEXPR const_reverse_iterator crbegin() const
Returns a const reverse iterator to the reverse beginning of the array.
Definition array_wrapper.h:224
etl::enable_if< etl::is_same< T, U >::value, void >::type swap(etl::array_wrapper< U, SIZE_, ARRAYOTHER > &other)
Swaps the contents of arrays.
Definition array_wrapper.h:316
const_reference at(size_t i) const
Returns a const reference to the indexed value.
Definition array_wrapper.h:297
ETL_CONSTEXPR size_t max_size() const
Returns the maximum possible size of the array.
Definition array_wrapper.h:264
reverse_iterator rend()
Returns a reverse iterator to the end of the array.
Definition array_wrapper.h:232
ETL_CONSTEXPR size_t size() const
Returns the size of the array.
Definition array_wrapper.h:256
ETL_CONSTEXPR const_reverse_iterator rbegin() const
Returns a const reverse iterator to the reverse beginning of the array.
Definition array_wrapper.h:216
reference at(size_t i)
Returns a reference to the indexed value.
Definition array_wrapper.h:288
#define ETL_ASSERT(b, e)
Definition error_handler.h:316
Definition exception.h:47
Definition array_wrapper.h:66
bitset_ext
Definition absolute.h:38
bool operator>(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:693
bool operator>=(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:705
bool operator!=(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:654
bool operator==(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:642
bool operator<(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:666
bool operator<=(const etl::array< T, SIZE > &lhs, const etl::array< T, SIZE > &rhs)
Definition array.h:681
pair holds two objects of arbitrary type
Definition utility.h:164