An array wrapper for easy copying, comparing, and iterating.
- Template Parameters
-
T | The type of the elements in the array. |
N | The number of elements in the array. |
Definition at line 32 of file Array.hpp.
|
T & | operator[] (size_t index) |
| Get the element at the given index.
|
|
const T & | operator[] (size_t index) const |
| Get the element at the given index.
|
|
T * | begin () |
| Get a pointer to the first element.
|
|
const T * | begin () const |
| Get a pointer to the first element.
|
|
T * | end () |
| Get a pointer to the memory beyond the array.
|
|
const T * | end () const |
| Get a pointer to the memory beyond the array.
|
|
bool | operator== (const Array< T, N > &rhs) const |
| Check the equality of all elements in two arrays.
|
|
bool | operator!= (const Array< T, N > &rhs) const |
| Check the inequality of all elements in two arrays.
|
|
template<size_t Start = 0, size_t End = N - 1> |
ArraySlice< T, abs_diff(Start, End)+1,(End< Start), false > | slice () |
| Get a view on a slice of the Array.
|
|
template<size_t Start = 0, size_t End = N - 1> |
ArraySlice< T, abs_diff(Start, End)+1,(End< Start), true > | slice () const |
| Get a read-only view on a slice of the Array.
|
|
template<size_t Start = 0, size_t End = N - 1> |
ArraySlice< T, abs_diff(Start, End)+1,(End< Start), true > | cslice () const |
| Get a read-only view on a slice of the Array.
|
|
template<size_t Start, size_t End> |
auto | slice () -> ArraySlice< T, abs_diff(Start, End)+1,(End< Start), false > |
|
template<size_t Start, size_t End> |
auto | slice () const -> ArraySlice< T, abs_diff(Start, End)+1,(End< Start), true > |
|
|
(Note that these are not member symbols.)
|
template<class T1 , class T2 , size_t N1, size_t N2> |
Array< decltype(T1 {}+T2 {}), N1 > | operator+ (const Array< T1, N1 > &a, const Array< T2, N2 > &b) |
| Array + Array.
|
|
template<class T1 , class T2 , size_t N1, size_t N2> |
Array< T1, N1 > & | operator+= (Array< T1, N1 > &a, const Array< T2, N2 > &b) |
| Array += Array.
|
|
template<class T1 , class T2 , size_t N1, size_t N2> |
Array< decltype(T1 {} - T2 {}), N1 > | operator- (const Array< T1, N1 > &a, const Array< T2, N2 > &b) |
| Array - Array.
|
|
template<class T1 , class T2 , size_t N1, size_t N2> |
Array< T1, N1 > & | operator-= (Array< T1, N1 > &a, const Array< T2, N2 > &b) |
| Array -= Array.
|
|
template<class T1 , class T2 , size_t N1> |
Array< decltype(T1 {} *T2 {}), N1 > | operator* (const Array< T1, N1 > &a, T2 b) |
| Array * Scalar.
|
|
template<class T1 , class T2 , size_t N2> |
Array< decltype(T1 {} *T2 {}), N2 > | operator* (T1 a, const Array< T2, N2 > &b) |
| Scalar * Array.
|
|
template<class T1 , class T2 , size_t N1> |
Array< T1, N1 > & | operator*= (Array< T1, N1 > &a, T2 b) |
| Array *= Scalar.
|
|
template<class T1 , class T2 , size_t N1> |
Array< decltype(T1 {}/T2 {}), N1 > | operator/ (const Array< T1, N1 > &a, T2 b) |
| Array / Scalar.
|
|
template<class T1 , class T2 , size_t N1> |
Array< T1, N1 > & | operator/= (Array< T1, N1 > &a, T2 b) |
| Array /= Scalar.
|
|
template<class T , size_t N> |
Array< decltype(-T {}), N > | operator- (const Array< T, N > &a) |
| -Array
|
|