(C++17) | ||||
| Sequence | ||||
(C++11) | ||||
(C++26) | ||||
(C++26) | ||||
(C++11) | ||||
| Associative | ||||
| Unordered associative | ||||
(C++11) | ||||
(C++11) | ||||
(C++11) | ||||
(C++11) | ||||
| Adaptors | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
(C++23) | ||||
| Views | ||||
(C++20) | ||||
(C++23) | ||||
| Tables | ||||
| Iterator invalidation | ||||
| Member function table | ||||
| Non-member function table |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
staticconstexpr rank_type rank()constnoexcept; | (since C++23) | |
Returns the number of dimensions inextents.
Contents |
(none)
The number of dimensions.
#include <iostream>#include <mdspan> int main(){std::extents<int,1,2> e1;std::extents<int,3,4,std::dynamic_extent> e2(5);std::cout<< e1.rank()<<", "<< e2.rank()<<'\n';}
Output:
2, 3
[static] | returns the dynamic rank of anextents(public static member function)[edit] |
(C++11) | obtains the number of dimensions of an array type (class template)[edit] |