Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
arene::base::array< T, N > Class Template Reference

A fixed-size array of T objects. More...

Inheritance diagram for arene::base::array< T, N >:
Inheritance graph

Public Types

using const_iterator = typename span<T const, N>::iterator
 An iterator for the array that treats the elements as const.
 
using const_pointer = T const*
 The type of a pointer to a const array element.
 
using const_reference = T const&
 The type of a reference to a const array element.
 
using const_reverse_iterator = typename span<T, N>::const_reverse_iterator
 An iterator for iteration through the array in reverse order that treats the elements as const.
 
using difference_type = std::ptrdiff_t
 The type for the distance between two iterators.
 
using iterator = typename span<T, N>::iterator
 An iterator for the array.
 
using pointer = T*
 The type of a pointer to an array element.
 
using reference = T&
 The type of a reference to an array element.
 
using reverse_iterator = typename span<T, N>::reverse_iterator
 An iterator for iteration through the array in reverse order.
 
using size_type = std::size_t
 The type returned by size()
 
using value_type = T
 The type of each array element.
 

Public Member Functions

template<bool AreExceptionsEnabled = detail::are_exceptions_enabled::value, constraints< std::enable_if_t< AreExceptionsEnabled > > = nullptr>
constexpr auto at (std::size_t index) -> T &
 Get a reference to the n'th element of the array, or throw.
 
template<bool AreExceptionsEnabled = detail::are_exceptions_enabled::value, constraints< std::enable_if_t< AreExceptionsEnabled > > = nullptr>
constexpr auto at (std::size_t index) const -> T const &
 Get a reference to the n'th element of the array, or throw.
 
constexpr auto back () const noexcept -> T const &
 Get a const-reference to the last element of the array.
 
constexpr auto back () noexcept -> T &
 Get a const-reference to the last element of the array.
 
constexpr auto begin () const noexcept -> const_iterator
 Obtain an iterator to the first element of the array.
 
constexpr auto begin () noexcept -> iterator
 Obtain an iterator to the first element of the array.
 
constexpr auto cbegin () const noexcept -> const_iterator
 Obtain a const_iterator that references the first element of the array.
 
constexpr auto cend () const noexcept -> const_iterator
 Obtain a const_iterator that references one past the last element of the array.
 
constexpr auto crbegin () const noexcept -> const_reverse_iterator
 Obtain a const_reverse_iterator that references the last element of the array.
 
constexpr auto crend () const noexcept -> const_reverse_iterator
 Obtain a const_reverse_iterator that references one before the first element of the array.
 
constexpr auto data () const noexcept -> T const *
 Obtain a pointer to the first element of the array.
 
constexpr auto data () noexcept -> T *
 Obtain a pointer to the first element of the array.
 
constexpr auto end () const noexcept -> const_iterator
 Obtain an iterator to the one-passed-the-end of the array.
 
constexpr auto end () noexcept -> iterator
 Obtain an iterator to the one-passed-the-end of the array.
 
template<typename U = T, constraints< std::enable_if_t< std::is_same< U, T >::value >, std::enable_if_t< std::is_copy_assignable< U >::value > > = nullptr>
constexpr void fill (T const &val) noexcept(std::is_nothrow_copy_assignable< T >::value)
 Set every element in the array to the provided value.
 
constexpr auto front () const noexcept -> T const &
 Get a const-reference to the first element of the array.
 
constexpr auto front () noexcept -> T &
 Get a reference to the first element of the array.
 
constexpr auto operator[] (std::size_t index) const noexcept -> T const &
 Get a reference to the n'th element of the array.
 
constexpr auto operator[] (std::size_t index) noexcept -> T &
 Get a reference to the n'th element of the array.
 
constexpr auto rbegin () const noexcept -> const_reverse_iterator
 Obtain a reverse_iterator to the last element of the array.
 
constexpr auto rbegin () noexcept -> reverse_iterator
 Obtain a reverse_iterator to the last element of the array.
 
constexpr auto rend () const noexcept -> const_reverse_iterator
 Obtai a const_reverse_iterator that references one before the first element of the array.
 
constexpr auto rend () noexcept -> reverse_iterator
 Obtain a reverse_iterator that references one-before the first element of the array.
 
template<typename U = T, constraints< std::enable_if_t< std::is_same< U, T >::value >, std::enable_if_t< is_swappable_v< U > > > = nullptr>
constexpr void swap (array &other) noexcept(is_nothrow_swappable_v< U >)
 swaps all the elements this array and another.
 

Static Public Member Functions

template<std::size_t UN, typename U = T, constraints< std::enable_if_t< has_fast_inequality_check_v< U > > > = nullptr>
static constexpr auto fast_inequality_check (array const &lhs, array< T, UN > const &rhs) noexcept -> arene::base::inequality_heuristic
 Quickly checks two arrays for inequality to see if a more costly full ordering check is needed.
 
template<std::size_t UN, typename U = T, constraints< std::enable_if_t< compare_three_way_supported_v< U > > > = nullptr>
static constexpr auto three_way_compare (array const &lhs, array< T, UN > const &rhs) noexcept -> arene::base::strong_ordering
 Imparts a lexicographic ordering of two arrays.
 
template<typename U = T, constraints< std::enable_if_t< compare_three_way_supported_v< U > > > = nullptr>
static constexpr auto three_way_compare (array const &, array< T, 0 > const &) noexcept -> arene::base::strong_ordering
 Imparts a lexicographic ordering of two arrays.
 

Public Attributes

values_ [N]
 The actual elements of the array object. This must be a public member to allow aggregate initialization, but users should treat it as private, and only use the documented public interface.
 

Static Public Attributes

static constexpr std::integral_constant< bool, false > empty {}
 Check if the array is empty, always false.
 
static constexpr std::integral_constant< std::size_t, N > max_size {}
 The maximum number of elements in the array, which is always N.
 
static constexpr std::integral_constant< std::size_t, N > size {}
 The number of elements in the array, which is always N.
 

Friends

template<std::size_t UN, typename U = T>
constexpr auto operator!= (array const &lhs, array< T, UN > const &rhs) noexcept -> bool
 Inequality compare all elements in the array.
 
template<typename U = T, constraints< std::enable_if_t< std::is_same< U, T >::value >, std::enable_if_t< is_swappable_v< U > > > = nullptr>
constexpr void swap (array &lhs, array &rhs) noexcept(noexcept(lhs.swap(rhs)))
 swaps all the elements between two arrays.
 
template<typename U = T, constraints< std::enable_if_t< is_equality_comparable_v< U > > > = nullptr>
constexpr auto operator== (array const &lhs, array const &rhs) noexcept -> bool
 Equality compare all elements in the array.
 
template<std::size_t UN, typename U = T, constraints< std::enable_if_t< is_equality_comparable_v< U > > > = nullptr>
constexpr auto operator== (array const &, array< T, UN > const &) noexcept -> bool
 Equality compare all elements in the array.
 
template<typename U = T, constraints< std::enable_if_t<!is_equality_comparable_v< U > >, std::enable_if_t< compare_three_way_supported_v< U > >, std::enable_if_t<!has_fast_inequality_check_v< U > > > = nullptr>
constexpr auto operator== (array const &lhs, array const &rhs) noexcept -> bool
 Equality compare all elements in the array.
 
template<typename U = T, constraints< std::enable_if_t<!is_equality_comparable_v< U > >, std::enable_if_t< compare_three_way_supported_v< U > >, std::enable_if_t< has_fast_inequality_check_v< U > > > = nullptr>
constexpr auto operator== (array const &lhs, array const &rhs) noexcept -> bool
 Equality compare all elements in the array.
 
template<std::size_t UN, typename U = T, constraints< std::enable_if_t<!is_equality_comparable_v< U > >, std::enable_if_t< compare_three_way_supported_v< U > > > = nullptr>
constexpr auto operator== (array const &, array< T, UN > const &) noexcept -> bool
 Equality compare all elements in the array.
 
template<std::size_t UN>
constexpr auto operator< (array const &lhs, array< T, UN > const &rhs) noexcept -> bool
 Imparts a lexicographic ordering of two arrays.
 
template<std::size_t UN>
constexpr auto operator<= (array const &lhs, array< T, UN > const &rhs) noexcept -> bool
 Imparts a lexicographic ordering of two arrays.
 
template<std::size_t UN>
constexpr auto operator> (array const &lhs, array< T, UN > const &rhs) noexcept -> bool
 Imparts a lexicographic ordering of two arrays.
 
template<std::size_t UN>
constexpr auto operator>= (array const &lhs, array< T, UN > const &rhs) noexcept -> bool
 Imparts a lexicographic ordering of two arrays.
 

Detailed Description

template<typename T, std::size_t N>
class arene::base::array< T, N >

A fixed-size array of T objects.

This is a backport of the constexpr std::array from C++17.

Template Parameters
TThe type of the element held by the array
NThe number of elements in the array

Member Typedef Documentation

◆ const_iterator

template<typename T, std::size_t N>
using arene::base::array< T, N >::const_iterator = typename span<T const, N>::iterator

An iterator for the array that treats the elements as const.

◆ const_pointer

template<typename T, std::size_t N>
using arene::base::array< T, N >::const_pointer = T const*

The type of a pointer to a const array element.

◆ const_reference

template<typename T, std::size_t N>
using arene::base::array< T, N >::const_reference = T const&

The type of a reference to a const array element.

◆ const_reverse_iterator

template<typename T, std::size_t N>
using arene::base::array< T, N >::const_reverse_iterator = typename span<T, N>::const_reverse_iterator

An iterator for iteration through the array in reverse order that treats the elements as const.

◆ difference_type

template<typename T, std::size_t N>
using arene::base::array< T, N >::difference_type = std::ptrdiff_t

The type for the distance between two iterators.

◆ iterator

template<typename T, std::size_t N>
using arene::base::array< T, N >::iterator = typename span<T, N>::iterator

An iterator for the array.

◆ pointer

template<typename T, std::size_t N>
using arene::base::array< T, N >::pointer = T*

The type of a pointer to an array element.

◆ reference

template<typename T, std::size_t N>
using arene::base::array< T, N >::reference = T&

The type of a reference to an array element.

◆ reverse_iterator

template<typename T, std::size_t N>
using arene::base::array< T, N >::reverse_iterator = typename span<T, N>::reverse_iterator

An iterator for iteration through the array in reverse order.

◆ size_type

template<typename T, std::size_t N>
using arene::base::array< T, N >::size_type = std::size_t

The type returned by size()

◆ value_type

template<typename T, std::size_t N>
using arene::base::array< T, N >::value_type = T

The type of each array element.

Member Function Documentation

◆ at() [1/2]

template<typename T, std::size_t N>
template<bool AreExceptionsEnabled = detail::are_exceptions_enabled::value, constraints< std::enable_if_t< AreExceptionsEnabled > > = nullptr>
auto arene::base::array< T, N >::at ( std::size_t index) -> T&
inlineconstexpr

Get a reference to the n'th element of the array, or throw.

Template Parameters
AreExceptionsEnabledSFINAE flag to disable this method if exceptions are not enabled. Should not be specified by the user.
Parameters
indexThe index of the element to access.
Returns
A reference to that element
Exceptions
std::out_of_rangeIf index is not less than N

◆ at() [2/2]

template<typename T, std::size_t N>
template<bool AreExceptionsEnabled = detail::are_exceptions_enabled::value, constraints< std::enable_if_t< AreExceptionsEnabled > > = nullptr>
auto arene::base::array< T, N >::at ( std::size_t index) const -> T const&
inlineconstexpr

Get a reference to the n'th element of the array, or throw.

Template Parameters
AreExceptionsEnabledDefaulted SFINAE flag to disable this method if exceptions are not enabled; should not be specified by user.
Parameters
indexThe index of the element to access.
Returns
A reference to that element
Exceptions
std::out_of_rangeIf index is not less than N

◆ back() [1/2]

template<typename T, std::size_t N>
auto arene::base::array< T, N >::back ( ) const -> T const&
inlineconstexprnoexcept

Get a const-reference to the last element of the array.

Returns
A reference to the last element

◆ back() [2/2]

template<typename T, std::size_t N>
auto arene::base::array< T, N >::back ( ) -> T&
inlineconstexprnoexcept

Get a const-reference to the last element of the array.

Returns
A reference to the last element

◆ begin() [1/2]

template<typename T, std::size_t N>
auto arene::base::array< T, N >::begin ( ) const -> const_iterator
inlineconstexprnoexcept

Obtain an iterator to the first element of the array.

Returns
a const_iterator that references the first element of the array.

◆ begin() [2/2]

template<typename T, std::size_t N>
auto arene::base::array< T, N >::begin ( ) -> iterator
inlineconstexprnoexcept

Obtain an iterator to the first element of the array.

Returns
an iterator that references the first element of the array.

◆ cbegin()

template<typename T, std::size_t N>
auto arene::base::array< T, N >::cbegin ( ) const -> const_iterator
inlineconstexprnoexcept

Obtain a const_iterator that references the first element of the array.

Returns
a const_iterator that references the first element of the array.

◆ cend()

template<typename T, std::size_t N>
auto arene::base::array< T, N >::cend ( ) const -> const_iterator
inlineconstexprnoexcept

Obtain a const_iterator that references one past the last element of the array.

Returns
a const_iterator that references one past the last element of the array.

◆ crbegin()

template<typename T, std::size_t N>
auto arene::base::array< T, N >::crbegin ( ) const -> const_reverse_iterator
inlineconstexprnoexcept

Obtain a const_reverse_iterator that references the last element of the array.

Returns
a const_reverse_iterator that references the last element of the array.

◆ crend()

template<typename T, std::size_t N>
auto arene::base::array< T, N >::crend ( ) const -> const_reverse_iterator
inlineconstexprnoexcept

Obtain a const_reverse_iterator that references one before the first element of the array.

Returns
a const_reverse_iterator that references one before the first element of the array.

◆ data() [1/2]

template<typename T, std::size_t N>
auto arene::base::array< T, N >::data ( ) const -> T const*
inlineconstexprnoexcept

Obtain a pointer to the first element of the array.

Returns
a pointer to the first element of the array, const-qualified.

◆ data() [2/2]

template<typename T, std::size_t N>
auto arene::base::array< T, N >::data ( ) -> T*
inlineconstexprnoexcept

Obtain a pointer to the first element of the array.

Returns
a pointer to the first element of the array.

◆ end() [1/2]

template<typename T, std::size_t N>
auto arene::base::array< T, N >::end ( ) const -> const_iterator
inlineconstexprnoexcept

Obtain an iterator to the one-passed-the-end of the array.

Returns
a const_iterator that references one past the last element of the array.

◆ end() [2/2]

template<typename T, std::size_t N>
auto arene::base::array< T, N >::end ( ) -> iterator
inlineconstexprnoexcept

Obtain an iterator to the one-passed-the-end of the array.

Returns
an iterator that references one-past the last element of the array.

◆ fast_inequality_check()

template<typename T, std::size_t N>
template<std::size_t UN, typename U = T, constraints< std::enable_if_t< has_fast_inequality_check_v< U > > > = nullptr>
static constexpr auto arene::base::array< T, N >::fast_inequality_check ( array< T, N > const & lhs,
array< T, UN > const & rhs ) -> arene::base::inequality_heuristic
inlinestaticconstexprnoexcept

Quickly checks two arrays for inequality to see if a more costly full ordering check is needed.

Parameters
lhsone of the arrays to compare
rhsthe other array to compare
Returns
arene::base::inequality_heuristic::definitely_not_equal if the two arrays have different sizes or if any pair of their elements compare definitely_not_equal
arene::base::inequality_heuristic::may_be_equal_or_not_equal otherwise

◆ fill()

template<typename T, std::size_t N>
template<typename U = T, constraints< std::enable_if_t< std::is_same< U, T >::value >, std::enable_if_t< std::is_copy_assignable< U >::value > > = nullptr>
void arene::base::array< T, N >::fill ( T const & val)
inlineconstexprnoexcept

Set every element in the array to the provided value.

Parameters
valThe value to use

◆ front() [1/2]

template<typename T, std::size_t N>
auto arene::base::array< T, N >::front ( ) const -> T const&
inlineconstexprnoexcept

Get a const-reference to the first element of the array.

Returns
A reference to the first element

◆ front() [2/2]

template<typename T, std::size_t N>
auto arene::base::array< T, N >::front ( ) -> T&
inlineconstexprnoexcept

Get a reference to the first element of the array.

Returns
A reference to the first element

◆ operator[]() [1/2]

template<typename T, std::size_t N>
auto arene::base::array< T, N >::operator[] ( std::size_t index) const -> T const&
inlineconstexprnoexcept

Get a reference to the n'th element of the array.

Parameters
indexThe index of the element to access.
Precondition
index Must be less than N or else ARENE_PRECONDITION violation.
Returns
A reference to that element

◆ operator[]() [2/2]

template<typename T, std::size_t N>
auto arene::base::array< T, N >::operator[] ( std::size_t index) -> T&
inlineconstexprnoexcept

Get a reference to the n'th element of the array.

Parameters
indexThe index of the element to access.
Precondition
index Must be less than N or else ARENE_PRECONDITION violation.
Returns
A reference to that element

◆ rbegin() [1/2]

template<typename T, std::size_t N>
auto arene::base::array< T, N >::rbegin ( ) const -> const_reverse_iterator
inlineconstexprnoexcept

Obtain a reverse_iterator to the last element of the array.

Returns
a const_reverse_iterator that references the last element of the array.

◆ rbegin() [2/2]

template<typename T, std::size_t N>
auto arene::base::array< T, N >::rbegin ( ) -> reverse_iterator
inlineconstexprnoexcept

Obtain a reverse_iterator to the last element of the array.

Returns
a reverse_iterator that references the last element of the array.

◆ rend() [1/2]

template<typename T, std::size_t N>
auto arene::base::array< T, N >::rend ( ) const -> const_reverse_iterator
inlineconstexprnoexcept

Obtai a const_reverse_iterator that references one before the first element of the array.

Returns
a const_reverse_iterator that references one before the first element of the array.

◆ rend() [2/2]

template<typename T, std::size_t N>
auto arene::base::array< T, N >::rend ( ) -> reverse_iterator
inlineconstexprnoexcept

Obtain a reverse_iterator that references one-before the first element of the array.

Returns
a reverse_iterator that references one-before the first element of the array.

◆ swap()

template<typename T, std::size_t N>
template<typename U = T, constraints< std::enable_if_t< std::is_same< U, T >::value >, std::enable_if_t< is_swappable_v< U > > > = nullptr>
void arene::base::array< T, N >::swap ( array< T, N > & other)
inlineconstexprnoexcept

swaps all the elements this array and another.

Template Parameters
Uthe type of the elements in the array. Must satisfy is_swappable_v .
Parameters
otherthe array to swap elements with
Postcondition
The elements in this array and other are exchanged 1:1. Relative order is maintained.

◆ three_way_compare() [1/2]

template<typename T, std::size_t N>
template<typename U = T, constraints< std::enable_if_t< compare_three_way_supported_v< U > > > = nullptr>
static constexpr auto arene::base::array< T, N >::three_way_compare ( array< T, N > const & ,
array< T, 0 > const &  ) -> arene::base::strong_ordering
inlinestaticconstexprnoexcept

Imparts a lexicographic ordering of two arrays.

Parameters
lhsone of the arrays to compare
rhsthe other array to compare
Returns
arene::base::strong_ordering::less if the first element which compares unequal between rhs and lhs also compares less-than, or if lhs is a strict prefix of rhs.
arene::base::strong_ordering::equal if all elements compare equal.
arene::base::strong_ordering::greater if the first element which compares unequal between rhs and lhs also compares greater, or if rhs is a strict prefix of lhs.

◆ three_way_compare() [2/2]

template<typename T, std::size_t N>
template<std::size_t UN, typename U = T, constraints< std::enable_if_t< compare_three_way_supported_v< U > > > = nullptr>
static constexpr auto arene::base::array< T, N >::three_way_compare ( array< T, N > const & lhs,
array< T, UN > const & rhs ) -> arene::base::strong_ordering
inlinestaticconstexprnoexcept

Imparts a lexicographic ordering of two arrays.

Parameters
lhsone of the arrays to compare
rhsthe other array to compare
Returns
arene::base::strong_ordering::less if the first element which compares unequal between rhs and lhs also compares less-than, or if lhs is a strict prefix of rhs.
arene::base::strong_ordering::equal if all elements compare equal.
arene::base::strong_ordering::greater if the first element which compares unequal between rhs and lhs also compares greater, or if rhs is a strict prefix of lhs.

Friends And Related Symbol Documentation

◆ operator!=

template<typename T, std::size_t N>
template<std::size_t UN, typename U = T>
auto operator!= ( array< T, N > const & lhs,
array< T, UN > const & rhs ) -> bool
friend

Inequality compare all elements in the array.

Parameters
lhsone of the arrays to compare
rhsthe other array to compare
Returns
true if any elements in the arrays are not equal, or the sizes of the arrays are different.
false if all elements in the arrays are equal.

◆ operator<

template<typename T, std::size_t N>
template<std::size_t UN>
auto operator< ( array< T, N > const & lhs,
array< T, UN > const & rhs ) -> bool
friend

Imparts a lexicographic ordering of two arrays.

Parameters
lhsone of the arrays to compare
rhsthe other array to compare
See also
arene::base::array<T,N>::three_way_compare .

◆ operator<=

template<typename T, std::size_t N>
template<std::size_t UN>
auto operator<= ( array< T, N > const & lhs,
array< T, UN > const & rhs ) -> bool
friend

Imparts a lexicographic ordering of two arrays.

Parameters
lhsone of the arrays to compare
rhsthe other array to compare
See also
arene::base::array<T,N>::three_way_compare .

◆ operator== [1/5]

template<typename T, std::size_t N>
template<std::size_t UN, typename U = T, constraints< std::enable_if_t< is_equality_comparable_v< U > > > = nullptr>
auto operator== ( array< T, N > const & ,
array< T, UN > const &  ) -> bool
friend

Equality compare all elements in the array.

Parameters
lhsone of the arrays to compare
rhsthe other array to compare
Returns
true if all elements in the arrays are equal.
false if any elements in the arrays are not equal, or the sizes of the arrays are different.

◆ operator== [2/5]

template<typename T, std::size_t N>
auto operator== ( array< T, N > const & ,
array< T, UN > const &  ) -> bool
friend

Equality compare all elements in the array.

Parameters
lhsone of the arrays to compare
rhsthe other array to compare
Returns
true if all elements in the arrays are equal.
false if any elements in the arrays are not equal, or the sizes of the arrays are different.

◆ operator== [3/5]

template<typename T, std::size_t N>
template<typename U = T, constraints< std::enable_if_t< is_equality_comparable_v< U > > > = nullptr>
auto operator== ( array< T, N > const & lhs,
array< T, N > const & rhs ) -> bool
friend

Equality compare all elements in the array.

Parameters
lhsone of the arrays to compare
rhsthe other array to compare
Returns
true if all elements in the arrays are equal.
false if any elements in the arrays are not equal, or the sizes of the arrays are different.

◆ operator== [4/5]

template<typename T, std::size_t N>
auto operator== ( array< T, N > const & lhs,
array< T, N > const & rhs ) -> bool
friend

Equality compare all elements in the array.

Parameters
lhsone of the arrays to compare
rhsthe other array to compare
Returns
true if all elements in the arrays are equal.
false if any elements in the arrays are not equal, or the sizes of the arrays are different.

◆ operator== [5/5]

template<typename T, std::size_t N>
auto operator== ( array< T, N > const & lhs,
array< T, N > const & rhs ) -> bool
friend

Equality compare all elements in the array.

Parameters
lhsone of the arrays to compare
rhsthe other array to compare
Returns
true if all elements in the arrays are equal.
false if any elements in the arrays are not equal, or the sizes of the arrays are different.

◆ operator>

template<typename T, std::size_t N>
template<std::size_t UN>
auto operator> ( array< T, N > const & lhs,
array< T, UN > const & rhs ) -> bool
friend

Imparts a lexicographic ordering of two arrays.

Parameters
lhsone of the arrays to compare
rhsthe other array to compare
See also
arene::base::array<T,N>::three_way_compare .

◆ operator>=

template<typename T, std::size_t N>
template<std::size_t UN>
auto operator>= ( array< T, N > const & lhs,
array< T, UN > const & rhs ) -> bool
friend

Imparts a lexicographic ordering of two arrays.

Parameters
lhsone of the arrays to compare
rhsthe other array to compare
See also
arene::base::array<T,N>::three_way_compare .

◆ swap

template<typename T, std::size_t N>
template<typename U = T, constraints< std::enable_if_t< std::is_same< U, T >::value >, std::enable_if_t< is_swappable_v< U > > > = nullptr>
void swap ( array< T, N > & lhs,
array< T, N > & rhs )
friend

swaps all the elements between two arrays.

Template Parameters
Uthe type of the elements in the array. Must satisfy is_swappable_v .
Parameters
lhsthe left hand array to swap.
rhsthe right hand array to swap.
Postcondition
The elements in lhs and rhs are exchanged 1:1. Relative order is maintained.

Member Data Documentation

◆ empty

template<typename T, std::size_t N>
std::integral_constant<bool, false> arene::base::array< T, N >::empty {}
staticconstexpr

Check if the array is empty, always false.

Returns
false

◆ max_size

template<typename T, std::size_t N>
std::integral_constant<std::size_t, N> arene::base::array< T, N >::max_size {}
staticconstexpr

The maximum number of elements in the array, which is always N.

Returns
The size of the array, N

◆ size

template<typename T, std::size_t N>
std::integral_constant<std::size_t, N> arene::base::array< T, N >::size {}
staticconstexpr

The number of elements in the array, which is always N.

Returns
The size of the array, N

◆ values_

template<typename T, std::size_t N>
T arene::base::array< T, N >::values_[N]

The actual elements of the array object. This must be a public member to allow aggregate initialization, but users should treat it as private, and only use the documented public interface.


The documentation for this class was generated from the following file: