#include <Containers/StaticArray.h>
template<std:: size_t, class>
StaticArray class
Compile-time-sized array.
Like Array, but with compile-time size information. Useful as a more featureful alternative to plain C arrays or std::
Usage
The StaticArray class provides an access and slicing API similar to Array, which in turn shares the basic workflow patterns with ArrayView, see its usage docs for details. The main difference is that StaticArray doesn't do any heap allocation and thus has no concept of a deleter, and it has additional compile-time-sized overloads of slice(), prefix(), suffix(), exceptPrefix() and exceptSuffix(), mirroring the APIs of StaticArrayView.
Array initialization
The array is by default value-initialized, which means that trivial types are zero-initialized and the default constructor is called on other types. It is possible to initialize the array in a different way using so-called tags:
- StaticArray(DefaultInitT) leaves trivial types uninitialized and calls the default constructor elsewhere. In other words,
T array[size]
. Because of the differing behavior for trivial types it's better to explicitly use either the ValueInit or NoInit variants instead. - StaticArray(ValueInitT) is equivalent to the implicit parameterless constructor, zero-initializing trivial types and calling the default constructor elsewhere. Useful when you want to make the choice appear explicit. In other words,
T array[size]{}
. - StaticArray(DirectInitT, Args&&... args) constructs every element of the array using provided arguments. In other words,
T array[size]{T{args...}, T{args...}, …}
. - StaticArray(InPlaceInitT, Args&&... args) is equivalent to StaticArray(Args&&... args). Again useful when you want to make the choice appear explicit). In other words,
T array[size]{args...}
. Note that the variadic template means you can't use{}
for nested type initializers but have to specify the types explicitly. An alternative is directly passing an array, i.e. with the items wrapped in an additional{}
, with StaticArray(InPlaceInitT, const T(&)[size]) or StaticArray(InPlaceInitT, T(&&)[size]), or using the implicit StaticArray(const T(&)[size]) and StaticArray(T(&&)[size]) variants. - StaticArray(NoInitT) does not initialize anything. Useful for trivial types when you'll be overwriting the contents anyway, for non-trivial types this is the dangerous option and you need to call the constructor on all elements manually using placement new, std::
uninitialized_copy() or similar.
Usage in constexpr contexts
In order to implement the StaticArray(NoInitT) constructor for arbitrary types, internally the data has to be a union
array. That would however lose trivial copyability and possibility to use the type in constexpr
contexts, so to solve that, types that have a trivial default constructor or a constructor taking NoInitT use a specialized internal representation without a union
. StaticArray of such types is then a constexpr
type and is trivially copyable if the underlying type is trivially copyable.
Conversion to array views
Arrays are implicitly convertible to ArrayView / StaticArrayView as described in the following table. The conversion is only allowed if T*
is implicitly convertible to U*
(or both are the same type) and both have the same size.
Public types
-
enum (anonymous) : std::
size_t { Size = size_ } - using Type = T
- Element type.
Constructors, destructors, conversion operators
- StaticArray(DefaultInitT) explicit constexpr
- Construct a default-initialized array.
- StaticArray(ValueInitT) explicit constexpr
- Construct a value-initialized array.
- StaticArray(NoInitT) explicit
- Construct an array without initializing its contents.
-
template<class ... Args>StaticArray(DirectInitT, Args && ... args) explicit
- Construct a direct-initialized array.
-
template<class ... Args>StaticArray(InPlaceInitT, Args && ... args) explicit constexpr
- Construct an in-place-initialized array.
-
template<std::StaticArray(InPlaceInitT, const T(&data)[size]) constexpr
size_t size> - In-place construct an array by copying the elements from a fixed-size array.
-
template<std::StaticArray(InPlaceInitT, T( && data)[size]) constexpr
size_t size> - In-place construct an array by moving the elements from a fixed-size array.
- StaticArray() constexpr
- Construct a value-initialized array.
-
template<class ... Args>StaticArray(Args && ... args) constexpr
- Construct an in-place-initialized array.
-
template<std::StaticArray(const T(&data)[size]) constexpr
size_t size> - In-place construct an array by copying the elements from a fixed-size array.
-
template<std::StaticArray(T( && data)[size]) constexpr
size_t size> - In-place construct an array by moving the elements from a fixed-size array.
-
template<class U, class = decltype(Implementation::StaticArrayViewConverter<size_, T, U>::to(std::operator U()
declval<StaticArrayView<size_, T>>()))> - Convert to external view representation.
-
template<class U, class = decltype(Implementation::StaticArrayViewConverter<size_, const T, U>::to(std::operator U() const constexpr
declval<StaticArrayView<size_, const T>>()))> - operator bool() const explicit constexpr
- Whether the array is non-empty.
- operator T*() &
- Conversion to array type.
- operator const T*() const & constexpr
Public functions
- auto data() -> T*
- Array data.
- auto data() const -> const T* constexpr
-
auto size() const -> std::
size_t constexpr - Array size.
- auto empty() const -> bool constexpr
- Whether the array is empty.
- auto begin() -> T*
- Pointer to the first element.
- auto begin() const -> const T* constexpr
- auto cbegin() const -> const T* constexpr
- auto end() -> T*
- Pointer to (one item after) the last element.
- auto end() const -> const T* constexpr
- auto cend() const -> const T* constexpr
- auto front() -> T&
- First element.
- auto front() const -> const T& constexpr
- auto back() -> T&
- Last element.
- auto back() const -> const T& constexpr
-
auto operator[](std::
size_t i) -> T& - Element access.
-
auto operator[](std::
size_t i) const -> const T& constexpr - auto slice(T* begin, T* end) -> ArrayView<T>
- View on a slice.
- auto slice(const T* begin, const T* end) const -> ArrayView<const T> constexpr
-
auto slice(std::
size_t begin, std:: size_t end) -> ArrayView<T> constexpr -
auto slice(std::
size_t begin, std:: size_t end) const -> ArrayView<const T> constexpr -
auto sliceSize(T* begin,
std::
size_t size) -> ArrayView<T> - View on a slice of given size.
-
auto sliceSize(const T* begin,
std::
size_t size) const -> ArrayView<const T> constexpr -
auto sliceSize(std::
size_t begin, std:: size_t size) -> ArrayView<T> -
auto sliceSize(std::
size_t begin, std:: size_t size) const -> ArrayView<const T> constexpr -
template<std::auto slice(T* begin) -> StaticArrayView<size__, T>
size_t size__> - Fixed-size view on a slice.
-
template<std::auto slice(const T* begin) const -> StaticArrayView<size__, const T> constexpr
size_t size__> -
template<std::auto slice(std::
size_t size__> size_t begin) -> StaticArrayView<size__, T> -
template<std::auto slice(std::
size_t size__> size_t begin) const -> StaticArrayView<size__, const T> constexpr -
template<std::auto slice() -> StaticArrayView<end_ - begin_, T>
size_t begin_, std:: size_t end_> - Fixed-size view on a slice.
-
template<std::auto slice() const -> StaticArrayView<end_ - begin_, const T> constexpr
size_t begin_, std:: size_t end_> -
template<std::auto sliceSize() -> StaticArrayView<size__, T>
size_t begin_, std:: size_t size__> - Fixed-size view on a slice of given size.
-
template<std::auto sliceSize() const -> StaticArrayView<size__, const T> constexpr
size_t begin_, std:: size_t size__> - auto prefix(T* end) -> ArrayView<T>
- View on a prefix until a pointer.
- auto prefix(const T* end) const -> ArrayView<const T> constexpr
- auto suffix(T* begin) -> ArrayView<T>
- View on a suffix after a pointer.
- auto suffix(const T* begin) const -> ArrayView<const T> constexpr
-
auto prefix(std::
size_t size) -> ArrayView<T> - View on the first
size
items. -
auto prefix(std::
size_t size) const -> ArrayView<const T> constexpr -
template<std::auto prefix() -> StaticArrayView<size__, T>
size_t size__> - Fixed-size view on the first
size__
items. -
template<std::auto prefix() const -> StaticArrayView<size__, const T> constexpr
size_t size__> -
auto exceptPrefix(std::
size_t size) -> ArrayView<T> - View except the first
size
items. -
auto exceptPrefix(std::
size_t size) const -> ArrayView<const T> constexpr -
template<std::auto exceptPrefix() -> StaticArrayView<size_ - size__, T>
size_t size__> - Fixed-size view except the first
size__
items. -
template<std::auto exceptPrefix() const -> StaticArrayView<size_ - size__, const T> constexpr
size_t size__> -
auto exceptSuffix(std::
size_t size) -> ArrayView<T> - View except the last
size
items. -
auto exceptSuffix(std::
size_t size) const -> ArrayView<const T> constexpr -
template<std::auto exceptSuffix() -> StaticArrayView<size_ - size__, T>
size_t size__> - Fixed-size view except the last
size__
items. -
template<std::auto exceptSuffix() const -> StaticArrayView<size_ - size__, const T> constexpr
size_t size__> -
template<std::auto prefix() -> StaticArrayView<viewSize, T>
size_t viewSize> -
template<std::auto prefix() const -> StaticArrayView<viewSize, const T> constexpr
size_t viewSize>
Enum documentation
template<std:: size_t _1, class _2>
enum Death:: Containers:: StaticArray<_1, _2>:: (anonymous) : std:: size_t
Enumerators | |
---|---|
Size |
Array size |
Function documentation
template<std:: size_t _1, class _2>
Death:: Containers:: StaticArray<_1, _2>:: StaticArray(DefaultInitT) explicit constexpr
Construct a default-initialized array.
Creates array of given size, the contents are default-initialized (i.e., trivial types are not initialized). Because of the differing behavior for trivial types it's better to explicitly use either the StaticArray(ValueInitT) or the StaticArray(NoInitT) variant instead.
template<std:: size_t _1, class _2>
Death:: Containers:: StaticArray<_1, _2>:: StaticArray(ValueInitT) explicit constexpr
Construct a value-initialized array.
Creates array of given size, the contents are value-initialized (i.e., trivial types are zero-initialized, default constructor called otherwise). This is the same as StaticArray().
template<std:: size_t _1, class _2>
Death:: Containers:: StaticArray<_1, _2>:: StaticArray(NoInitT) explicit
Construct an array without initializing its contents.
Creates array of given size, the contents are not initialized. Useful if you will be overwriting all elements later anyway or if you need to call custom constructors in a way that's not expressible via any other StaticArray constructor.
For trivial types is equivalent to StaticArray(DefaultInitT). For non-trivial types, the class will explicitly call the destructor on all elements — which means that for non-trivial types you're expected to construct all elements using placement new (or for example std::
template<std:: size_t _1, class _2>
template<class ... Args>
Death:: Containers:: StaticArray<_1, _2>:: StaticArray(DirectInitT,
Args && ... args) explicit
Construct a direct-initialized array.
Constructs the array using the StaticArray(NoInitT) constructor and then initializes each element with placement new using forwarded args
.
template<std:: size_t _1, class _2>
template<class ... Args>
Death:: Containers:: StaticArray<_1, _2>:: StaticArray(InPlaceInitT,
Args && ... args) explicit constexpr
Construct an in-place-initialized array.
The arguments are forwarded to the array constructor. Note that the variadic template means you can't use {}
for nested type initializers — see StaticArray(InPlaceInitT, const T(&)[size]) or StaticArray(InPlaceInitT, T(&&)[size]) for an alternative. Same as StaticArray(Args&&... args).
To prevent accidents, compared to regular C array initialization the constructor expects the number of arguments to match the size exactly. I.e., it's not possible to omit a suffix of the array to implicitly value-initialize it.
template<std:: size_t _1, class _2>
template<std:: size_t size>
Death:: Containers:: StaticArray<_1, _2>:: StaticArray(InPlaceInitT,
const T(&data)[size]) constexpr
In-place construct an array by copying the elements from a fixed-size array.
Compared to StaticArray(InPlaceInitT, Args&&... args) doesn't require the elements to have explicitly specified type. The array elements are copied to the array constructor, if you have a non-copyable type or want to move the elements, use StaticArray(InPlaceInitT, T(&&)[size]) instead. Same as StaticArray(const T(&)[size]).
To prevent accidents, compared to regular C array initialization the constructor expects the number of arguments to match the size exactly. I.e., it's not possible to omit a suffix of the array to implicitly value-initialize it.
template<std:: size_t _1, class _2>
template<std:: size_t size>
Death:: Containers:: StaticArray<_1, _2>:: StaticArray(InPlaceInitT,
T( && data)[size]) constexpr
In-place construct an array by moving the elements from a fixed-size array.
Compared to StaticArray(InPlaceInitT, Args&&... args) doesn't require the elements to have an explicitly specified type. Same as StaticArray(T(&&)[size]).
template<std:: size_t _1, class _2>
Death:: Containers:: StaticArray<_1, _2>:: StaticArray() constexpr
Construct a value-initialized array.
Alias to StaticArray(ValueInitT).
template<std:: size_t _1, class _2>
template<class ... Args>
Death:: Containers:: StaticArray<_1, _2>:: StaticArray(Args && ... args) constexpr
Construct an in-place-initialized array.
template<std:: size_t _1, class _2>
template<std:: size_t size>
Death:: Containers:: StaticArray<_1, _2>:: StaticArray(const T(&data)[size]) constexpr
In-place construct an array by copying the elements from a fixed-size array.
template<std:: size_t _1, class _2>
template<std:: size_t size>
Death:: Containers:: StaticArray<_1, _2>:: StaticArray(T( && data)[size]) constexpr
In-place construct an array by moving the elements from a fixed-size array.
Alias to StaticArray(InPlaceInitT, T(&&)[size]).
template<std:: size_t _1, class _2>
template<class U, class = decltype(Implementation::StaticArrayViewConverter<size_, const T, U>::to(std:: declval<StaticArrayView<size_, const T>>()))>
Death:: Containers:: StaticArray<_1, _2>:: operator U() const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
Death:: Containers:: StaticArray<_1, _2>:: operator const T*() const & constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
const T* Death:: Containers:: StaticArray<_1, _2>:: data() const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
std:: size_t Death:: Containers:: StaticArray<_1, _2>:: size() const constexpr
Array size.
Equivalent to Size.
template<std:: size_t _1, class _2>
bool Death:: Containers:: StaticArray<_1, _2>:: empty() const constexpr
Whether the array is empty.
Always true
(it's not possible to create a zero-sized C array).
template<std:: size_t _1, class _2>
const T* Death:: Containers:: StaticArray<_1, _2>:: begin() const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
const T* Death:: Containers:: StaticArray<_1, _2>:: cbegin() const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
const T* Death:: Containers:: StaticArray<_1, _2>:: end() const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
const T* Death:: Containers:: StaticArray<_1, _2>:: cend() const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
const T& Death:: Containers:: StaticArray<_1, _2>:: front() const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
const T& Death:: Containers:: StaticArray<_1, _2>:: back() const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
T& Death:: Containers:: StaticArray<_1, _2>:: operator[](std:: size_t i)
Element access.
Expects that i
is less than size().
template<std:: size_t _1, class _2>
const T& Death:: Containers:: StaticArray<_1, _2>:: operator[](std:: size_t i) const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
ArrayView<T> Death:: Containers:: StaticArray<_1, _2>:: slice(T* begin,
T* end)
View on a slice.
Equivalent to StaticArrayView::
template<std:: size_t _1, class _2>
ArrayView<const T> Death:: Containers:: StaticArray<_1, _2>:: slice(const T* begin,
const T* end) const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
ArrayView<T> Death:: Containers:: StaticArray<_1, _2>:: slice(std:: size_t begin,
std:: size_t end) constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
ArrayView<const T> Death:: Containers:: StaticArray<_1, _2>:: slice(std:: size_t begin,
std:: size_t end) const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
ArrayView<T> Death:: Containers:: StaticArray<_1, _2>:: sliceSize(T* begin,
std:: size_t size)
View on a slice of given size.
Equivalent to StaticArrayView::
template<std:: size_t _1, class _2>
ArrayView<const T> Death:: Containers:: StaticArray<_1, _2>:: sliceSize(const T* begin,
std:: size_t size) const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
ArrayView<T> Death:: Containers:: StaticArray<_1, _2>:: sliceSize(std:: size_t begin,
std:: size_t size)
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
ArrayView<const T> Death:: Containers:: StaticArray<_1, _2>:: sliceSize(std:: size_t begin,
std:: size_t size) const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
template<std:: size_t size__>
StaticArrayView<size__, T> Death:: Containers:: StaticArray<_1, _2>:: slice(T* begin)
Fixed-size view on a slice.
Equivalent to StaticArrayView::
template<std:: size_t _1, class _2>
template<std:: size_t size__>
StaticArrayView<size__, const T> Death:: Containers:: StaticArray<_1, _2>:: slice(const T* begin) const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
template<std:: size_t size__>
StaticArrayView<size__, T> Death:: Containers:: StaticArray<_1, _2>:: slice(std:: size_t begin)
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
template<std:: size_t size__>
StaticArrayView<size__, const T> Death:: Containers:: StaticArray<_1, _2>:: slice(std:: size_t begin) const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
StaticArrayView<end_ - begin_, T> Death:: Containers:: StaticArray<_1, _2>:: slice()
Fixed-size view on a slice.
Equivalent to StaticArrayView::
StaticArrayView<end_ - begin_, const T> Death:: Containers:: StaticArray<_1, _2>:: slice() const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
StaticArrayView<size__, T> Death:: Containers:: StaticArray<_1, _2>:: sliceSize()
Fixed-size view on a slice of given size.
Equivalent to StaticArrayView::
StaticArrayView<size__, const T> Death:: Containers:: StaticArray<_1, _2>:: sliceSize() const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
ArrayView<T> Death:: Containers:: StaticArray<_1, _2>:: prefix(T* end)
View on a prefix until a pointer.
Equivalent to StaticArrayView::
template<std:: size_t _1, class _2>
ArrayView<const T> Death:: Containers:: StaticArray<_1, _2>:: prefix(const T* end) const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
ArrayView<T> Death:: Containers:: StaticArray<_1, _2>:: suffix(T* begin)
View on a suffix after a pointer.
Equivalent to StaticArrayView::
template<std:: size_t _1, class _2>
ArrayView<const T> Death:: Containers:: StaticArray<_1, _2>:: suffix(const T* begin) const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
ArrayView<T> Death:: Containers:: StaticArray<_1, _2>:: prefix(std:: size_t size)
View on the first size
items.
Equivalent to StaticArrayView::
template<std:: size_t _1, class _2>
ArrayView<const T> Death:: Containers:: StaticArray<_1, _2>:: prefix(std:: size_t size) const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
template<std:: size_t size__>
StaticArrayView<size__, T> Death:: Containers:: StaticArray<_1, _2>:: prefix()
Fixed-size view on the first size__
items.
Equivalent to StaticArrayView::
template<std:: size_t _1, class _2>
template<std:: size_t size__>
StaticArrayView<size__, const T> Death:: Containers:: StaticArray<_1, _2>:: prefix() const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
ArrayView<T> Death:: Containers:: StaticArray<_1, _2>:: exceptPrefix(std:: size_t size)
View except the first size
items.
Equivalent to StaticArrayView::
template<std:: size_t _1, class _2>
ArrayView<const T> Death:: Containers:: StaticArray<_1, _2>:: exceptPrefix(std:: size_t size) const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
template<std:: size_t size__>
StaticArrayView<size_ - size__, T> Death:: Containers:: StaticArray<_1, _2>:: exceptPrefix()
Fixed-size view except the first size__
items.
Equivalent to StaticArrayView::
template<std:: size_t _1, class _2>
template<std:: size_t size__>
StaticArrayView<size_ - size__, const T> Death:: Containers:: StaticArray<_1, _2>:: exceptPrefix() const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
ArrayView<T> Death:: Containers:: StaticArray<_1, _2>:: exceptSuffix(std:: size_t size)
View except the last size
items.
Equivalent to StaticArrayView::
template<std:: size_t _1, class _2>
ArrayView<const T> Death:: Containers:: StaticArray<_1, _2>:: exceptSuffix(std:: size_t size) const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
template<std:: size_t size__>
StaticArrayView<size_ - size__, T> Death:: Containers:: StaticArray<_1, _2>:: exceptSuffix()
Fixed-size view except the last size__
items.
Equivalent to StaticArrayView::
template<std:: size_t _1, class _2>
template<std:: size_t size__>
StaticArrayView<size_ - size__, const T> Death:: Containers:: StaticArray<_1, _2>:: exceptSuffix() const constexpr
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<std:: size_t _1, class _2>
template<std:: size_t size, class T>
ArrayView<T> arrayView(StaticArray<size, T>& array) constexpr
Make a view on a StaticArray.
Convenience alternative to converting to an ArrayView explicitly.
template<std:: size_t _1, class _2>
template<std:: size_t size, class T>
ArrayView<const T> arrayView(const StaticArray<size, T>& array) constexpr
Make a view on a const StaticArray.
Convenience alternative to converting to an ArrayView explicitly.
template<std:: size_t _1, class _2>
template<std:: size_t size, class T>
StaticArrayView<size, T> staticArrayView(StaticArray<size, T>& array) constexpr
Make a static view on a StaticArray.
Convenience alternative to converting to an StaticArrayView explicitly.
template<std:: size_t _1, class _2>
template<std:: size_t size, class T>
StaticArrayView<size, const T> staticArrayView(const StaticArray<size, T>& array) constexpr
Make a static view on a const StaticArray.
Convenience alternative to converting to an StaticArrayView explicitly.
template<std:: size_t _1, class _2>
template<class U, std:: size_t size, class T>
StaticArrayView<size*sizeof(T)/sizeof(U), U> arrayCast(StaticArray<size, T>& array)
Reinterpret-cast a static array.
See arrayCast(StaticArrayView<size, T>) for more information.
template<std:: size_t _1, class _2>
template<std:: size_t size_, class T>
std:: size_t arraySize(const StaticArray<size_, T>&) constexpr
Static array size.
See arraySize(ArrayView<T>) for more information.