Per P0009R18, the version WG21 voted into C++ this Monday, mdspan::size() should return size_t, not size_type. This is probably not a spec typo, because the function has the following precondition:
Precondition: The size of the multidimensional index space extents() is representable as a value of type size_t ([basic.fundamental]).
The function needs two changes.
Compute the product of the extents using size_t (regardless of size_type or index_type)
Return size_t, not size_type
This was reported by the RAPIDS RAFT team (thanks!).
https://github.com/kokkos/mdspan/blob/d56cb92d27a78be0e64efc7788697af1f91ae695/include/experimental/__p0009_bits/mdspan.hpp#L342
Per P0009R18, the version WG21 voted into C++ this Monday,
mdspan::size()
should returnsize_t
, notsize_type
. This is probably not a spec typo, because the function has the following precondition:The function needs two changes.
size_t
(regardless ofsize_type
orindex_type
)size_t
, notsize_type
This was reported by the RAPIDS RAFT team (thanks!).
(Please also check
mdarray::size()
-- thanks!)