std::full_extent, std::full_extent_t
From cppreference.com
Defined in header <mdspan>
|
||
struct full_extent_t { explicit full_extent_t() = default; }; |
(1) | (since C++26) |
inline constexpr std::full_extent_t full_extent {}; |
(2) | (since C++26) |
1) The class
std::full_extent_t
is a slice specifier type that can be used in std::submdspan.2) The corresponding
std::full_extent
instance of (1) is a slice specifier to indicate full range of indices in the specified extent in std::submdspan.[edit] Example
Run this code
#include <mdspan> #include <print> void print(auto view) { static_assert(view.rank() <= 2); if constexpr (view.rank() == 2) { for (