(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 |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Defined in header <mdspan> | ||
template<class IndexType,std::size_t...Extents> class extents; | (1) | (since C++23) |
template<class IndexType,std::size_t Rank> using dextents=/* see below */ | (2) | (since C++23) |
template<std::size_t Rank,class IndexType=std::size_t> using dims= std::dextents<IndexType, Rank>; | (3) | (since C++26) |
extents. Letd denotestd::dynamic_extent, each specialization of itdextents<IndexType, Rank> is equivalent toextents<IndexType/*, d, d, ..., d*/> (i.e.d is repeated a total ofRank times).Each specialization ofextents modelsregular and isTriviallyCopyable.
Contents |
| IndexType | - | the type of each non-dynamicExtents. Shall be a signed or unsigned integer type. Otherwise, the program is ill-formed |
| Extents | - | represents extent (size of an integer interval) for each rank index. Each element of it is either equal tostd::dynamic_extent (in this case, it represents adynamic extent and the extent size will be determined dynamically), or is representable as a value of typeIndexType (then it represents astatic extent and the extent size is just the value of it), or else the program is ill-formed |
| Rank | - | denotes the rank of an all-dynamicextents |
| Member type | Definition |
index_type | IndexType |
size_type | std::make_unsigned_t<index_type> |
rank_type | std::size_t |
| Member name | Definition |
std::array<index_type, rank_dynamic()>dynamic-extents(private) | An array which stores the size of each dynamic extents. (exposition-only member object*) |
constructs anextents(public member function)[edit] | |
Observers | |
[static] | returns the static rank of anextents(public static member function)[edit] |
[static] | returns the dynamic rank of anextents(public static member function)[edit] |
[static] | returns static extent size of anextents at a certain rank index(public static member function)[edit] |
returns dynamic extent size of anextents at a certain rank index(public member function)[edit] | |
Helpers | |
returns the product of extent size in range[0, i)(exposition-only member function*)[edit] | |
returns the product of extents size in range[i+1, rank())(exposition-only member function*)[edit] | |
| casts the input into an integer type (exposition-only member function*)[edit] | |
(private) | returns the number of dynamic extents below a certain rank index (exposition-only member function*)[edit] |
(private) | returns the numberr such that in range[0, r+1) there is exactlyi + 1 dynamic extents for a certain argumenti(exposition-only member function*)[edit] |
(C++23) | compare underlying extents in each dimension of twoextents(function)[edit] |
| This section is incomplete Reason: no example |
(C++11) | obtains the number of dimensions of an array type (class template)[edit] |
(C++11) | obtains the size of an array type along a specified dimension (class template)[edit] |