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

来自cppreference.com
< cpp‎ | container‎ | mdspan
 
 
 
 
static constexpr std::size_t static_extent( rank_type r ) noexcept;
(C++23 起)

静态地确定 mdspan 在秩索引 r 上的尺度。如果秩索引 r 对应于动态尺度,则返回 std::dynamic_extent。等价于 return Extents::static_extent(r);

参数

r-要获得静态尺度大小的秩索引

返回值

静态尺度大小,或 std::dynamic_extent

示例

参阅

返回 extents 在特定秩索引上的静态尺度大小
(std::extents<IndexType,Extents...> 的公开静态成员函数)
返回 mdspan 在给定秩索引上的尺度
(公开成员函数)