std::layout_right::mapping<Extents>::operator()

From cppreference.com
< cpp‎ | container‎ | mdspan‎ | layout right‎ | mapping
template < class... Indices >
constexpr index_type operator( ) ( Indices... indices ) const noexcept ;
(since C++23)

Maps the multidimensional index indices into an offset value.

Equivalent to return ( ( static_cast <index_type> (indices) * stride(P) ) + ... + 0 ) ; where P is a pack such that std::is_same_v < std::index_sequence_for <Indices...>, std::index_sequence <P...>> is true

This overload participates in overload resolution only if :

If extents_type​:: index-cast (i) is not a multidimensional index in extents()

Parameters

indices - the multidimensional index in the underlying extents object

Return value

The offset value.

Example

See also

maps a multidimensional index into an offset value
(public member function of std::layout_left::mapping<Extents>)
maps a multidimensional index into an offset value
(public member function of std::layout_stride::mapping<Extents>)
accesses an element at the specified multidimensional index
(public member function of std::mdspan<T,Extents,LayoutPolicy,AccessorPolicy>)