Loading...
Searching...
No Matches
array_view.h
Go to the documentation of this file.
/******************************************************************************
The MIT License(MIT)
Embedded Template Library.
https://github.com/ETLCPP/etl
https://www.etlcpp.com
Copyright(c) 2017 John Wellbelove
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files(the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions :
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
******************************************************************************/
#ifndef ETL_ARRAY_VIEW_INCLUDED
#define ETL_ARRAY_VIEW_INCLUDED
#include "platform.h"
#include "algorithm.h"
#include "array.h"
#include "error_handler.h"
#include "exception.h"
#include "hash.h"
#include "iterator.h"
#include "memory.h"
#include "nullptr.h"
#include "type_traits.h"
#if ETL_USING_STL && ETL_USING_CPP11
#include <array>
#endif
namespace etl
{
//***************************************************************************
//***************************************************************************
class array_view_exception : public exception
{
public:
array_view_exception(string_type reason_, string_type file_name_, numeric_type line_number_)
: exception(reason_, file_name_, line_number_)
{
}
};
//***************************************************************************
//***************************************************************************
class array_view_bounds : public array_view_exception
{
public:
array_view_bounds(string_type file_name_, numeric_type line_number_)
: array_view_exception(ETL_ERROR_TEXT("array_view:bounds", ETL_ARRAY_VIEW_FILE_ID"A"), file_name_, line_number_)
{
}
};
//***************************************************************************
//***************************************************************************
class array_view_uninitialised : public array_view_exception
{
public:
array_view_uninitialised(string_type file_name_, numeric_type line_number_)
: array_view_exception(ETL_ERROR_TEXT("array_view:uninitialised", ETL_ARRAY_VIEW_FILE_ID"B"), file_name_, line_number_)
{
}
};
//***************************************************************************
//***************************************************************************
class array_view_empty : public array_view_exception
{
public:
array_view_empty(string_type file_name_, numeric_type line_number_)
: array_view_exception(ETL_ERROR_TEXT("array_view:empty", ETL_ARRAY_VIEW_FILE_ID"C"), file_name_, line_number_)
{
}
};
//***************************************************************************
//***************************************************************************
template <typename T>
class array_view
{
public:
typedef T value_type;
typedef size_t size_type;
typedef const T& const_reference;
typedef const T* const_pointer;
typedef const T* const_iterator;
typedef ETL_OR_STD::reverse_iterator<const_iterator> const_reverse_iterator;
#if defined(ETL_ARRAY_VIEW_IS_MUTABLE)
typedef T* pointer;
typedef T& reference;
typedef T* iterator;
typedef ETL_OR_STD::reverse_iterator<iterator> reverse_iterator;
#else
typedef const_pointer pointer;
typedef const_reference reference;
typedef const_pointer iterator;
typedef const_reverse_iterator reverse_iterator;
#endif
//*************************************************************************
//*************************************************************************
ETL_CONSTEXPR array_view() ETL_NOEXCEPT
: mbegin(ETL_NULLPTR)
, mend(ETL_NULLPTR)
{
}
#if ETL_USING_CPP11
//*************************************************************************
//*************************************************************************
template < typename U, size_t Size,
typename = typename etl::enable_if< etl::is_same<etl::remove_cv_t<T>, etl::remove_cv_t<U>>::value, void>::type>
ETL_CONSTEXPR array_view(etl::array<U, Size>& a) ETL_NOEXCEPT
: mbegin(a.data())
, mend(a.data() + a.size())
{
}
//*************************************************************************
//*************************************************************************
template < typename U, size_t Size,
typename = typename etl::enable_if< etl::is_same<etl::remove_cv_t<T>, etl::remove_cv_t<U>>::value, void>::type>
ETL_CONSTEXPR array_view(const etl::array<U, Size>& a) ETL_NOEXCEPT
: mbegin(a.data())
, mend(a.data() + a.size())
{
}
#else
//*************************************************************************
//*************************************************************************
template <typename U, size_t Size>
ETL_CONSTEXPR array_view(
etl::array<U, Size>& a,
typename etl::enable_if< etl::is_same<typename etl::remove_cv<T>::type, typename etl::remove_cv<U>::type>::value, void>::type* = 0) ETL_NOEXCEPT
: mbegin(a.data())
, mend(a.data() + a.size())
{
}
//*************************************************************************
//*************************************************************************
template <typename U, size_t Size>
ETL_CONSTEXPR array_view(
const etl::array<U, Size>& a,
typename etl::enable_if< etl::is_same<typename etl::remove_cv<T>::type, typename etl::remove_cv<U>::type>::value, void>::type* = 0) ETL_NOEXCEPT
: mbegin(a.data())
, mend(a.data() + a.size())
{
}
#endif
#if ETL_USING_STL && ETL_USING_CPP11
//*************************************************************************
//*************************************************************************
template < typename U, size_t Size,
typename = typename etl::enable_if< etl::is_same<etl::remove_cv_t<T>, etl::remove_cv_t<U>>::value, void>::type>
ETL_CONSTEXPR array_view(std::array<U, Size>& a) ETL_NOEXCEPT
: mbegin(a.data())
, mend(a.data() + a.size())
{
}
//*************************************************************************
//*************************************************************************
template < typename U, size_t Size,
typename = typename etl::enable_if< etl::is_same<etl::remove_cv_t<T>, etl::remove_cv_t<U>>::value, void>::type>
ETL_CONSTEXPR array_view(const std::array<U, Size>& a) ETL_NOEXCEPT
: mbegin(a.data())
, mend(a.data() + a.size())
{
}
#endif
#if ETL_USING_CPP11
//*************************************************************************
//*************************************************************************
template < typename TContainer,
typename = typename etl::enable_if<
!etl::is_pointer<etl::remove_reference_t<TContainer>>::value && !etl::is_array<etl::remove_reference_t<TContainer>>::value
&& etl::is_same<etl::remove_cv_t<T>, etl::remove_cv_t<typename etl::remove_reference_t< TContainer>::value_type>>::value,
void>::type>
ETL_CONSTEXPR array_view(TContainer&& a) ETL_NOEXCEPT
: mbegin(a.data())
, mend(a.data() + a.size())
{
}
#else
//*************************************************************************
//*************************************************************************
template <typename TContainer>
ETL_CONSTEXPR array_view(TContainer& a,
typename etl::enable_if<
!etl::is_pointer< typename etl::remove_reference<TContainer>::type>::value && !etl::is_array<TContainer>::value
&& etl::is_same< typename etl::remove_cv<T>::type,
typename etl::remove_cv<typename etl::remove_reference< TContainer>::type::value_type>::type>::value,
void>::type* = 0) ETL_NOEXCEPT
: mbegin(a.data())
, mend(a.data() + a.size())
{
}
//*************************************************************************
//*************************************************************************
template <typename TContainer>
ETL_CONSTEXPR array_view(const TContainer& a,
typename etl::enable_if<
!etl::is_pointer< typename etl::remove_reference<TContainer>::type>::value && !etl::is_array<TContainer>::value
&& etl::is_same< typename etl::remove_cv<T>::type,
typename etl::remove_cv<typename etl::remove_reference< TContainer>::type::value_type>::type>::value,
void>::type* = 0) ETL_NOEXCEPT
: mbegin(a.data())
, mend(a.data() + a.size())
{
}
#endif
//*************************************************************************
//*************************************************************************
template <typename TIterator>
ETL_CONSTEXPR array_view(const TIterator begin_, const TIterator end_) ETL_NOEXCEPT
: mbegin(etl::to_address(begin_))
, mend(etl::to_address(begin_) + etl::distance(begin_, end_))
{
}
//*************************************************************************
//*************************************************************************
template <typename TIterator, typename TSize>
ETL_CONSTEXPR array_view(const TIterator begin_, const TSize size_) ETL_NOEXCEPT
: mbegin(etl::to_address(begin_))
, mend(etl::to_address(begin_) + size_)
{
}
//*************************************************************************
//*************************************************************************
template <size_t Array_Size>
ETL_CONSTEXPR array_view(T (&begin_)[Array_Size]) ETL_NOEXCEPT
: mbegin(begin_)
, mend(begin_ + Array_Size)
{
}
//*************************************************************************
//*************************************************************************
ETL_CONSTEXPR array_view(const array_view& other) ETL_NOEXCEPT
: mbegin(other.mbegin)
, mend(other.mend)
{
}
//*************************************************************************
//*************************************************************************
reference front()
{
ETL_ASSERT_CHECK_EXTRA(!empty(), ETL_ERROR(array_view_empty));
return *mbegin;
}
//*************************************************************************
//*************************************************************************
const_reference front() const
{
ETL_ASSERT_CHECK_EXTRA(!empty(), ETL_ERROR(array_view_empty));
return *mbegin;
}
//*************************************************************************
//*************************************************************************
reference back()
{
ETL_ASSERT_CHECK_EXTRA(!empty(), ETL_ERROR(array_view_empty));
return *(mend - 1);
}
//*************************************************************************
//*************************************************************************
const_reference back() const
{
ETL_ASSERT_CHECK_EXTRA(!empty(), ETL_ERROR(array_view_empty));
return *(mend - 1);
}
//*************************************************************************
//*************************************************************************
pointer data() ETL_NOEXCEPT
{
return mbegin;
}
//*************************************************************************
//*************************************************************************
const_pointer data() const ETL_NOEXCEPT
{
return mbegin;
}
//*************************************************************************
//*************************************************************************
iterator begin() ETL_NOEXCEPT
{
return mbegin;
}
//*************************************************************************
//*************************************************************************
const_iterator begin() const ETL_NOEXCEPT
{
return mbegin;
}
//*************************************************************************
//*************************************************************************
const_iterator cbegin() const ETL_NOEXCEPT
{
return mbegin;
}
//*************************************************************************
//*************************************************************************
iterator end() ETL_NOEXCEPT
{
return mend;
}
//*************************************************************************
//*************************************************************************
const_iterator end() const ETL_NOEXCEPT
{
return mend;
}
//*************************************************************************
// Returns a const iterator to the end of the array.
//*************************************************************************
const_iterator cend() const ETL_NOEXCEPT
{
return mend;
}
//*************************************************************************
// Returns an reverse iterator to the reverse beginning of the array.
//*************************************************************************
reverse_iterator rbegin() ETL_NOEXCEPT
{
return reverse_iterator(mend);
}
//*************************************************************************
//*************************************************************************
const_reverse_iterator rbegin() const ETL_NOEXCEPT
{
return const_reverse_iterator(mend);
}
//*************************************************************************
//*************************************************************************
const_reverse_iterator crbegin() const ETL_NOEXCEPT
{
return const_reverse_iterator(mend);
}
//*************************************************************************
//*************************************************************************
reverse_iterator rend() ETL_NOEXCEPT
{
return reverse_iterator(mbegin);
}
//*************************************************************************
//*************************************************************************
const_reverse_iterator rend() const ETL_NOEXCEPT
{
return const_reverse_iterator(mbegin);
}
//*************************************************************************
//*************************************************************************
const_reverse_iterator crend() const ETL_NOEXCEPT
{
return const_reverse_iterator(mbegin);
}
//*************************************************************************
//*************************************************************************
ETL_CONSTEXPR bool empty() const ETL_NOEXCEPT
{
return (mbegin == mend);
}
//*************************************************************************
//*************************************************************************
ETL_CONSTEXPR size_t size() const ETL_NOEXCEPT
{
return static_cast<size_t>(mend - mbegin);
}
//*************************************************************************
//*************************************************************************
ETL_CONSTEXPR size_t max_size() const ETL_NOEXCEPT
{
return size();
}
//*************************************************************************
//*************************************************************************
array_view& operator=(const array_view& other) ETL_NOEXCEPT
{
mbegin = other.mbegin;
mend = other.mend;
return *this;
}
//*************************************************************************
//*************************************************************************
template <typename TIterator>
void assign(const TIterator begin_, const TIterator end_)
{
mbegin = etl::to_address(begin_);
mend = etl::to_address(begin_) + etl::distance(begin_, end_);
}
//*************************************************************************
//*************************************************************************
template <typename TIterator, typename TSize>
void assign(const TIterator begin_, const TSize size_)
{
mbegin = etl::to_address(begin_);
mend = etl::to_address(begin_) + size_;
}
#if defined(ETL_ARRAY_VIEW_IS_MUTABLE)
//*************************************************************************
//*************************************************************************
reference operator[](const size_t i) ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS || ETL_NOT_CHECKING_INDEX_OPERATOR)
{
ETL_ASSERT_CHECK_INDEX_OPERATOR(i < size(), ETL_ERROR(array_view_bounds));
return mbegin[i];
}
#endif
//*************************************************************************
//*************************************************************************
const_reference operator[](const size_t i) const ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS || ETL_NOT_CHECKING_INDEX_OPERATOR)
{
ETL_ASSERT_CHECK_INDEX_OPERATOR(i < size(), ETL_ERROR(array_view_bounds));
return mbegin[i];
}
#if defined(ETL_ARRAY_VIEW_IS_MUTABLE)
//*************************************************************************
//*************************************************************************
reference at(const size_t i)
{
ETL_ASSERT((mbegin != ETL_NULLPTR && mend != ETL_NULLPTR), ETL_ERROR(array_view_uninitialised));
ETL_ASSERT(i < size(), ETL_ERROR(array_view_bounds));
return mbegin[i];
}
#endif
//*************************************************************************
//*************************************************************************
const_reference at(const size_t i) const
{
ETL_ASSERT((mbegin != ETL_NULLPTR && mend != ETL_NULLPTR), ETL_ERROR(array_view_uninitialised));
ETL_ASSERT(i < size(), ETL_ERROR(array_view_bounds));
return mbegin[i];
}
//*************************************************************************
//*************************************************************************
void swap(array_view& other) ETL_NOEXCEPT
{
using ETL_OR_STD::swap; // Allow ADL
swap(mbegin, other.mbegin);
swap(mend, other.mend);
}
//*************************************************************************
//*************************************************************************
void remove_prefix(const size_type n) ETL_NOEXCEPT
{
if (n < size())
mbegin += n;
else
mbegin = mend;
}
//*************************************************************************
//*************************************************************************
void remove_suffix(const size_type n) ETL_NOEXCEPT
{
if (n < size())
mend -= n;
else
mend = mbegin;
}
//*************************************************************************
//*************************************************************************
void fill(const T& value)
{
etl::fill(begin(), end(), value);
}
//*************************************************************************
//*************************************************************************
friend bool operator==(const array_view<T>& lhs, const array_view<T>& rhs)
{
return (lhs.size() == rhs.size()) && etl::equal(lhs.begin(), lhs.end(), rhs.begin());
}
//*************************************************************************
//*************************************************************************
friend bool operator!=(const array_view<T>& lhs, const array_view<T>& rhs)
{
return !(lhs == rhs);
}
//*************************************************************************
//*************************************************************************
friend bool operator<(const array_view<T>& lhs, const array_view<T>& rhs)
{
return etl::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
}
//*************************************************************************
//*************************************************************************
friend bool operator>(const array_view<T>& lhs, const array_view<T>& rhs)
{
return rhs < lhs;
}
//*************************************************************************
//*************************************************************************
friend bool operator<=(const array_view<T>& lhs, const array_view<T>& rhs)
{
return !(lhs > rhs);
}
//*************************************************************************
//*************************************************************************
friend bool operator>=(const array_view<T>& lhs, const array_view<T>& rhs)
{
return !(lhs < rhs);
}
private:
pointer mbegin;
pointer mend;
};
//*************************************************************************
//*************************************************************************
#if ETL_USING_CPP17
template <typename TArray>
array_view(TArray& a) -> array_view<typename TArray::value_type>;
template <typename TIterator>
array_view(const TIterator begin_, const TIterator end_) -> array_view<etl::remove_pointer_t<TIterator>>;
template <typename TIterator, typename TSize>
array_view(const TIterator begin_, const TSize size_) -> array_view<etl::remove_pointer_t<TIterator>>;
#endif
//*************************************************************************
//*************************************************************************
#if ETL_USING_8BIT_TYPES
template <typename T>
struct hash<etl::array_view<T> >
{
size_t operator()(const etl::array_view<T>& view) const
{
return etl::private_hash::generic_hash<size_t>(reinterpret_cast<const uint8_t*>(view.data()),
reinterpret_cast<const uint8_t*>(view.data() + view.size()));
}
};
#endif
} // namespace etl
//*************************************************************************
//*************************************************************************
template <typename T>
void swap(etl::array_view<T>& lhs, etl::array_view<T>& rhs) ETL_NOEXCEPT
{
lhs.swap(rhs);
}
#endif
algorithm.h
array.h
swap
void swap(etl::array_view< T > &lhs, etl::array_view< T > &rhs) ETL_NOEXCEPT
Swaps the values.
Definition array_view.h:692
etl::array_view_empty
The exception thrown when the view is empty.
Definition array_view.h:100
etl::array_view
Array view.
Definition array_view.h:114
etl::array_view::array_view
ETL_CONSTEXPR array_view(etl::array< U, Size > &a, typename etl::enable_if< etl::is_same< typename etl::remove_cv< T >::type, typename etl::remove_cv< U >::type >::value, void >::type *=0) ETL_NOEXCEPT
Construct from etl::array.
Definition array_view.h:172
etl::array_view::operator!=
friend bool operator!=(const array_view< T > &lhs, const array_view< T > &rhs)
Inequality for array views.
Definition array_view.h:615
etl::array_view::array_view
ETL_CONSTEXPR array_view(const array_view &other) ETL_NOEXCEPT
Copy constructor.
Definition array_view.h:299
etl::array_view::array_view
ETL_CONSTEXPR array_view() ETL_NOEXCEPT
Default constructor.
Definition array_view.h:139
etl::array_view::front
reference front()
Definition array_view.h:310
etl::array_view::back
const_reference back() const
Definition array_view.h:343
etl::array_view::end
iterator end() ETL_NOEXCEPT
Returns an iterator to the end of the array.
Definition array_view.h:392
etl::array_view::begin
const_iterator begin() const ETL_NOEXCEPT
Returns a const iterator to the beginning of the array.
Definition array_view.h:376
etl::array_view::size
ETL_CONSTEXPR size_t size() const ETL_NOEXCEPT
Returns the size of the array.
Definition array_view.h:472
etl::array_view::operator<=
friend bool operator<=(const array_view< T > &lhs, const array_view< T > &rhs)
Less-than-equal for array views.
Definition array_view.h:639
etl::array_view::max_size
ETL_CONSTEXPR size_t max_size() const ETL_NOEXCEPT
Returns the maximum possible size of the array.
Definition array_view.h:480
etl::array_view::swap
void swap(array_view &other) ETL_NOEXCEPT
Swaps with another array_view.
Definition array_view.h:566
etl::array_view::cbegin
const_iterator cbegin() const ETL_NOEXCEPT
Returns a const iterator to the beginning of the array.
Definition array_view.h:384
etl::array_view::end
const_iterator end() const ETL_NOEXCEPT
Returns a const iterator to the end of the array.
Definition array_view.h:400
etl::array_view::empty
ETL_CONSTEXPR bool empty() const ETL_NOEXCEPT
Returns true if the array size is zero.
Definition array_view.h:464
etl::array_view::front
const_reference front() const
Definition array_view.h:321
etl::array_view::array_view
ETL_CONSTEXPR array_view(const etl::array< U, Size > &a, typename etl::enable_if< etl::is_same< typename etl::remove_cv< T >::type, typename etl::remove_cv< U >::type >::value, void >::type *=0) ETL_NOEXCEPT
Construct from etl::array.
Definition array_view.h:184
etl::array_view::at
const_reference at(const size_t i) const
Returns a const reference to the indexed value.
Definition array_view.h:556
etl::array_view::begin
iterator begin() ETL_NOEXCEPT
Returns an iterator to the beginning of the array.
Definition array_view.h:368
etl::array_view::operator=
array_view & operator=(const array_view &other) ETL_NOEXCEPT
Assign from a view.
Definition array_view.h:488
etl::array_view::fill
void fill(const T &value)
Fills the array.
Definition array_view.h:599
etl::array_view::array_view
ETL_CONSTEXPR array_view(const TContainer &a, typename etl::enable_if< !etl::is_pointer< typename etl::remove_reference< TContainer >::type >::value &&!etl::is_array< TContainer >::value &&etl::is_same< typename etl::remove_cv< T >::type, typename etl::remove_cv< typename etl::remove_reference< TContainer >::type::value_type >::type >::value, void >::type *=0) ETL_NOEXCEPT
Definition array_view.h:254
etl::array_view::operator>
friend bool operator>(const array_view< T > &lhs, const array_view< T > &rhs)
Greater-than for array views.
Definition array_view.h:631
etl::array_view::operator==
friend bool operator==(const array_view< T > &lhs, const array_view< T > &rhs)
Equality for array views.
Definition array_view.h:607
etl::array_view::array_view
ETL_CONSTEXPR array_view(const TIterator begin_, const TIterator end_) ETL_NOEXCEPT
Construct from iterators.
Definition array_view.h:270
etl::array_view::rend
const_reverse_iterator rend() const ETL_NOEXCEPT
Returns a const reverse iterator to the end of the array.
Definition array_view.h:448
etl::array_view::remove_prefix
void remove_prefix(const size_type n) ETL_NOEXCEPT
Shrinks the view by moving its start forward.
Definition array_view.h:577
etl::array_view::array_view
ETL_CONSTEXPR array_view(TContainer &a, typename etl::enable_if< !etl::is_pointer< typename etl::remove_reference< TContainer >::type >::value &&!etl::is_array< TContainer >::value &&etl::is_same< typename etl::remove_cv< T >::type, typename etl::remove_cv< typename etl::remove_reference< TContainer >::type::value_type >::type >::value, void >::type *=0) ETL_NOEXCEPT
Definition array_view.h:238
etl::array_view::data
pointer data() ETL_NOEXCEPT
Returns a pointer to the first element of the internal storage.
Definition array_view.h:352
etl::array_view::operator>=
friend bool operator>=(const array_view< T > &lhs, const array_view< T > &rhs)
Greater-than-equal for array views.
Definition array_view.h:647
etl::array_view::remove_suffix
void remove_suffix(const size_type n) ETL_NOEXCEPT
Shrinks the view by moving its end backward.
Definition array_view.h:588
etl::array_view::array_view
ETL_CONSTEXPR array_view(const TIterator begin_, const TSize size_) ETL_NOEXCEPT
Construct from iterator and size.
Definition array_view.h:280
etl::array_view::assign
void assign(const TIterator begin_, const TIterator end_)
Assign from iterators.
Definition array_view.h:499
etl::array_view::assign
void assign(const TIterator begin_, const TSize size_)
Assign from iterator and size.
Definition array_view.h:509
etl::array_view::crend
const_reverse_iterator crend() const ETL_NOEXCEPT
Returns a const reverse iterator to the end of the array.
Definition array_view.h:456
etl::array_view::operator<
friend bool operator<(const array_view< T > &lhs, const array_view< T > &rhs)
Less-than for array views.
Definition array_view.h:623
etl::array_view::array_view
ETL_CONSTEXPR array_view(T(&begin_)[Array_Size]) ETL_NOEXCEPT
Construct from C array.
Definition array_view.h:290
etl::array_view::rend
reverse_iterator rend() ETL_NOEXCEPT
Returns a reverse iterator to the end of the array.
Definition array_view.h:440
etl::array_view::rbegin
const_reverse_iterator rbegin() const ETL_NOEXCEPT
Returns a const reverse iterator to the reverse beginning of the array.
Definition array_view.h:424
etl::array_view::data
const_pointer data() const ETL_NOEXCEPT
Returns a const pointer to the first element of the internal storage.
Definition array_view.h:360
etl::array_view::operator[]
const_reference operator[](const size_t i) const ETL_NOEXCEPT_EXPR(ETL_NOT_USING_EXCEPTIONS||ETL_NOT_CHECKING_INDEX_OPERATOR)
Definition array_view.h:534
etl::array_view::back
reference back()
Definition array_view.h:332
etl::array_view::crbegin
const_reverse_iterator crbegin() const ETL_NOEXCEPT
Returns a const reverse iterator to the reverse beginning of the array.
Definition array_view.h:432
error_handler.h
exception.h
etl::const_iterator
etl::array
Definition array.h:85
ETL_ASSERT
#define ETL_ASSERT(b, e)
Definition error_handler.h:511
etl::exception::exception
ETL_EXCEPTION_CONSTEXPR exception(string_type reason_, string_type, numeric_type)
Constructor.
Definition exception.h:81
type
etl::array_view_bounds
Definition array_view.h:73
etl::array_view_uninitialised
Definition array_view.h:87
hash.h
iterator.h
memory.h
etl
Definition absolute.h:40
etl::to_address
ETL_CONSTEXPR T * to_address(T *p) ETL_NOEXCEPT
Definition memory.h:61
etl::cend
TContainer::const_iterator cend(const TContainer &container)
Definition iterator.h:1186
nullptr.h
platform.h
etl::reference
etl::type
etl::remove_cv
remove_cv
Definition type_traits.h:325
etl::remove_reference
remove_reference
Definition type_traits.h:122
type_traits.h