std::extents<IndexType,Extents...>::index-cast
template< class OtherIndexType > static constexpr auto /*index-cast*/( OtherIndexType&& i ) noexcept; |
(since C++23) (exposition only*) |
Преобразует индекс i типа OtherIndexType в определённый целочисленный тип. Эквивалентно:
-
return i;, еслиOtherIndexType— целочисленный тип, отличный от bool, и -
return static_cast<index_type>(i);в противном случае.
Параметры
| i | - | индекс для преобразования |
Возвращаемое значение
Преобразованный индекс.
Примечания
Пример
См. также
© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/container/mdspan/extents/index-cast