template<unsigned dimensions, class T>
Corrade::Containers::StridedDimensions class

Helper for specifying sizes and strides for StridedArrayView.

Main property compared to a plain C array of value is convertibility from/to StaticArrayView, implicit conversion from/to a scalar type in the one-dimensional case and element-wise equality comparison. See StridedArrayView for actual usage examples.

Constructors, destructors, conversion operators

StridedDimensions() constexpr noexcept
Default constructor.
StridedDimensions(ValueInitT) explicit constexpr noexcept
Construct with zero-initialized data.
StridedDimensions(NoInitT) explicit noexcept
Construct without initializing the contents.
template<class ... Args>
StridedDimensions(T first, Args... next) constexpr noexcept
Constructor.
StridedDimensions(StaticArrayView<dimensions, const T> values) constexpr noexcept
Construct from a view.
StridedDimensions(const T(&values)[dimensions]) constexpr noexcept
Construct from an array.
operator StaticArrayView<dimensions, const T>() const constexpr
Conversion to an array view.
operator T() const constexpr
Conversion to a scalar.

Public functions

auto operator==(const StridedDimensions<dimensions, T>& other) const -> bool
Equality comparison.
auto operator!=(const StridedDimensions<dimensions, T>& other) const -> bool
Non-equality comparison.
auto operator[](std::size_t i) const -> T constexpr
Element access.
auto operator[](std::size_t i) -> T&
Element access.
auto begin() const -> const T* constexpr
First element.
auto cbegin() const -> const T* constexpr
auto end() const -> const T* constexpr
(One item after) last element
auto cend() const -> const T* constexpr

Function documentation

template<unsigned dimensions, class T>
Corrade::Containers::StridedDimensions<dimensions, T>::StridedDimensions() constexpr noexcept

Default constructor.

Equivalent to StridedDimensions(ValueInitT).

template<unsigned dimensions, class T>
Corrade::Containers::StridedDimensions<dimensions, T>::operator T() const constexpr

Conversion to a scalar.

Enabled only for the one-dimensional case.

template<unsigned dimensions, class T>
const T* Corrade::Containers::StridedDimensions<dimensions, T>::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<unsigned dimensions, class T>
const T* Corrade::Containers::StridedDimensions<dimensions, T>::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.