template<class IndexType, class S>
constexpr auto canonical-index(S s);
概要
canonical-indexは、submdspan動作仕様定義で用いられる説明専用の関数テンプレートである。
適格要件
Sがintegral-constant-likeのモデルであるとき、extents<IndexType>::index-cast(std::move(s))をIndexType型の値として表現できること。
事前条件
extents<IndexType>::index-cast(std::move(s))をIndexType型の値として表現できること。
効果
以下と等価
Sがintegral-constant-likeのモデルであるとき、return cw<IndexType(S::value)>- そうではないとき、
return IndexType(std::move(s))
バージョン
言語
- C++26