std::mdspan<T,Extents,LayoutPolicy,AccessorPolicy>::size

来自cppreference.com
< cpp‎ | container‎ | mdspan
 
 
 
 
constexpr size_type size() const noexcept;
(C++23 起)

返回 mdspan ���的元素数量。

等价于 extents().fwd-prod-of-extents(rank())

多维索引空间 extents() 的大小必须可表示为 size_type 类型的值,否则,其行为未定义。。

[编辑] 返回值

元素的数量。

[编辑] 示例

[编辑] 参阅