Namespaces
Variants
Views
Actions

std::extents<IndexType,Extents...>::index-cast

From cppreference.com
< cpp‎ | container‎ | mdspan‎ | extents
Revision as of 16:54, 27 October 2023 by Space Mission (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
 
 
 
 
 
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.

Contents

[edit] Parameters

i - the index to be cast

[edit] Return value

Cast index.

[edit] Notes

[edit] Example

[edit] See also