Shared/Containers/ArrayView.h file

Namespaces

namespace Death
Shared root namespace.
namespace Death::Containers
Container implementations.

Classes

template<class T>
class Death::Containers::ArrayView
Array view.
template<>
class Death::Containers::ArrayView<void>
Void array view.
template<>
class Death::Containers::ArrayView<const void>
Constant void array view.
template<std::size_t size_, class T>
class Death::Containers::StaticArrayView
Compile-time-sized array view.

Functions

template<class T>
auto arrayView(T* data, std::size_t size) -> ArrayView<T> constexpr
Make a view on an array of specific length.
template<std::size_t size, class T>
auto arrayView(T(&data)[size]) -> ArrayView<T> constexpr
Make a view on fixed-size array.
template<class T>
auto arrayView(std::initializer_list<T> list) -> ArrayView<const T>
Make a view on an initializer list.
template<std::size_t size, class T>
auto arrayView(StaticArrayView<size, T> view) -> ArrayView<T> constexpr
Make a view on StaticArrayView.
template<class T>
auto arrayView(ArrayView<T> view) -> ArrayView<T> constexpr
Make a view on a view.
template<class T, class U = decltype(Implementation::ErasedArrayViewConverter<typename std::remove_reference<T && >::type>::from(std::declval<T && >()))>
auto arrayView(T&& other) -> U constexpr
Make a view on an external type / from an external representation.
template<class U, class T>
auto arrayCast(ArrayView<T> view) -> ArrayView<U>
Reinterpret-cast an array view.
template<class U>
auto arrayCast(ArrayView<const void> view) -> ArrayView<U>
Reinterpret-cast a void array view.
template<class T>
auto arraySize(ArrayView<T> view) -> std::size_t constexpr
Array view size.
template<std::size_t size_, class T>
auto arraySize(StaticArrayView<size_, T>) -> std::size_t constexpr
template<std::size_t size_, class T>
auto arraySize(T(&)[size_]) -> std::size_t constexpr
C array size.
template<std::size_t size_, class T, class U>
auto arraySize(U(T::*)[size_]) -> std::size_t constexpr
C array member size.
template<std::size_t size, class T>
auto staticArrayView(T* data) -> StaticArrayView<size, T> constexpr
Make a static view on an array.
template<std::size_t size, class T>
auto staticArrayView(T(&data)[size]) -> StaticArrayView<size, T> constexpr
Make a static view on a fixed-size array.
template<std::size_t size, class T>
auto staticArrayView(StaticArrayView<size, T> view) -> StaticArrayView<size, T> constexpr
Make a static view on a view.
template<class T, class U = decltype(Implementation::ErasedStaticArrayViewConverter<typename std::remove_reference<T && >::type>::from(std::declval<T && >()))>
auto staticArrayView(T&& other) -> U constexpr
Make a static view on an external type / from an external representation.
template<class U, std::size_t size, class T>
auto arrayCast(StaticArrayView<size, T> view) -> StaticArrayView<size*sizeof(T)/sizeof(U), U>
Reinterpret-cast a static array view.
template<class U, std::size_t size, class T>
auto arrayCast(T(&data)[size]) -> StaticArrayView<size*sizeof(T)/sizeof(U), U>
Reinterpret-cast a statically sized array.