Scroll to navigation

std::mdspan::rank(3) C++ Standard Libary std::mdspan::rank(3)

NAME

std::mdspan::rank - std::mdspan::rank

Synopsis

static constexpr rank_type rank() noexcept; (since C++23)

Returns the number of dimensions in a mdspan. Equivalent to return Extents::rank().

Parameters

(none)

Return value

The number of dimensions.

Example


This section is incomplete
Reason: no example

See also

rank returns the static rank of an extents [static] (public static member function of std::extents<IndexType,Extents...>) rank_dynamic returns the dynamic rank of a mdspan [static] (public static member function)

2026.11.10 http://cppreference.com