• Class / Function / Type

      std::
    • Header file

      <>
    • Other / All

    最終更新日時(UTC):
    が更新

    履歴 編集

    named requirement
    <mdspan>

    ::LayoutMappingPolicy

    概要

    LayoutMappingPolicyは、多次元配列ビューmdspanにおいて多次元インデクスから参照先メモリブロック位置へと変換するレイアウトマッピングを定めるクラスが満たすべき要件である。

    LayoutMappingPolicyを満たすユーザ定義layout_customポリシークラスは、下記の構造で定義される。

    // レイアウトマッピングポリシー
    struct layout_custom {
      // レイアウトマッピング
      template<class Extents>
      class mapping {
      public:
        using layout_type = layout_custom;
        using extent_type = Extents;
        // ...
      };
    };
    

    要件

    LayoutMappingPolicyを満たす型MP

    • extentsの特殊化Eに対してMP::mapping<E>が有効であり、かつ
    • その型Xレイアウトマッピング要件を満たし、かつ
    • メンバ型X::layout_typeが型MPを表しており、かつ
    • メンバ型X::extent_typeが型Eを表すこと。

    LayoutMappingPolicyに該当する型

    バージョン

    言語

    • C++23

    関連項目

    参照