命名空间
变体
操作

std::layout_stride::mapping<Extents>::required_span_size

来自 cppreference.cn
< cpp‎ | 容器‎ | mdspan‎ | layout stride‎ | mapping
 
 
 
 
 
constexpr index_type required_span_size() const noexcept;
(C++23 起)

返回映射所需的尺寸。

s 等于

  • 1,如果 extents().rank() == 0true
  • 否则,0,如果多维索引空间 extents() 的大小为 0
  • 否则,1 加上所有 r 在范围 [0extents().rank()) 内的 extents().extent(r) - 1extents_type::index-cast(strides_[r]) 乘积之和。

调用等价于 return s;

[编辑] 返回值

映射所需的尺寸。

[编辑] 示例

[编辑] 参阅

返回映射的所需大小
(std::layout_left::mapping<Extents> 的公有成员函数) [编辑]
返回映射的所需大小
(std::layout_right::mapping<Extents> 的公有成员函数) [编辑]
返回多维索引空间的大小
(std::mdspan<T,Extents,LayoutPolicy,AccessorPolicy> 的公有成员函数) [编辑]