名前空間
変種
操作

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

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

多次元インデックス indices をオフセット値にマッピングします。

return ((static_cast<index_type>(indices) * stride(P)) + ... + 0); に相当します。ここで、P は、std::is_same_v<std::index_sequence_for<Indices...>, std::index_sequence<P...>>true となるようなパックです。

このオーバーロードは、以下の条件が満たされる場合にのみオーバーロード解決に参加します。

extents_type​::index-cast(i)extents() における多次元インデックスでない場合、動作は未定義です。

目次

[編集] パラメータ

indices - 基になる extents オブジェクトにおける多次元インデックス

[編集] 戻り値

オフセット値。

[編集]

[編集] 関連項目

多次元インデックスをオフセット値にマッピングします。
(std::layout_right::mapping<Extents> の public メンバ関数) [編集]
多次元インデックスをオフセット値にマッピングします。
(std::layout_stride::mapping<Extents> の public メンバ関数) [編集]
指定された多次元インデックスの要素にアクセスする
(std::mdspan<T,Extents,LayoutPolicy,AccessorPolicy> の public メンバ関数) [編集]
English 日本語 中文(简体) 中文(繁體)