std::extents<IndexType,Extents...>:: index-cast
From cppreference.com
C++
Containers library
Sequence | ||||
(C++11)
|
||||
(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 |
std::mdspan
|
std::extents
Member functions | ||||
Observers | ||||
Helpers | ||||
extents::
index-cast
|
||||
Non-member functions | ||||
Deduction guides |
template
<
class
OtherIndexType
>
static constexpr auto /*index-cast*/ ( OtherIndexType && i ) noexcept ; |
(since C++23)
( exposition only* ) |
|
Casts the index
i
in type
OtherIndexType
into certain integral type. It is equivalent to:
-
return
i
;
, if
OtherIndexType
is an integral type other than bool and - return static_cast < index_type > ( i ) ; otherwise.
Parameters
i | - | the index to be cast |
Return value
Cast index.
Notes
This section is incomplete |
Example
This section is incomplete
Reason: no example |
See also
This section is incomplete |
Retrieved from "
https://en.cppreference.com/mwiki/index.php?title=cpp/container/mdspan/extents/index-cast&oldid=161535
"