(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 |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
constexpr index_type extent( rank_type i)constnoexcept; | (since C++23) | |
Returns dynamic extent size of anextents at a certain rank index.
Contents |
| i | - | The rank index to get the extent size of |
The dynamic extent size of anextents at a certain rank index.
#include <iostream>#include <mdspan> int main(){std::extents<int,1,2> e1;std::extents<int,3,std::dynamic_extent,std::dynamic_extent> e2(4,5);std::cout<< e1.extent(0)<<", "<< e1.extent(1)<<'\n';std::cout<< e2.extent(0)<<", "<< e2.extent(1)<<", "<< e2.extent(2)<<'\n';}
Output:
1, 23, 4, 5
[static] | returns static extent size of anextents at a certain rank index(public static member function)[edit] |
(C++11) | obtains the size of an array type along a specified dimension (class template)[edit] |