Namespaces
Variants

std::extents<IndexType,Extents...>:: extents

From cppreference.net
constexpr extents ( ) = default ;
(1) (C++23以降)
template < class OtherIndexType, std:: size_t ... OtherExtents >

constexpr explicit ( /*詳細は後述*/ )

extents ( const std:: extents < OtherIndexType, OtherExtents... > & other ) noexcept ;
(2) (C++23以降)
template < class ... OtherIndexTypes >
constexpr explicit extents ( OtherIndexTypes... exts ) noexcept ;
(3) (C++23以降)
template < class OtherIndexType, std:: size_t N >

constexpr explicit ( N ! = rank_dynamic ( ) )

extents ( std:: span < OtherIndexType, N > exts ) noexcept ;
(4) (C++23以降)
template < class OtherIndexType, std:: size_t N >

constexpr explicit ( N ! = rank_dynamic ( ) )

extents ( const std:: array < OtherIndexType, N > & exts ) noexcept ;
(5) (C++23以降)

extents を構築します。 extents は、保存されるすべての値である動的エクステントのみから、または事前条件付きのすべてのエクステントから構築できます。

1) デフォルトコンストラクタ。すべての動的エクステントをゼロに初期化します。
2) 他の extents オブジェクトからの変換。構築後、 * this == other true となる。
  • 以下の場合、動作は未定義である:
  • other. extent ( r ) ! = static_extent ( r ) が、 static_extent ( r ) が静的エクステントを表す任意の r に対して成り立つ場合、または
  • other. extent ( r ) IndexType 型の値として表現できない場合( other 内の任意のランク値 r に対して)。
  • このオーバーロードは、以下の場合にのみオーバーロード解決に参加する:
  • このコンストラクタは、以下の場合に explicit となる:
3) N sizeof... ( exts ) とし、 exts_arr std:: array < IndexType, N > { static_cast < IndexType > ( std :: move ( exts ) ) ... } とする。これは extents ( exts_arr ) と等価である。
  • このオーバーロードは、以下の条件が満たされる場合にのみオーバーロード解決に参加する:
  • 以下の場合、動作は未定義である:
  • N ! = rank_dynamic ( ) であり、かつ exts_arr [ r ] static_extent ( r ) と等しくないような r が存在する場合( static_extent ( r ) が静的エクステントを表す場合)、または
  • exts の要素が負の値であるか、 IndexType 型の値として表現できない場合。
4,5) N rank_dynamic ( ) と等しい場合、すべての d について [ 0 , rank_dynamic ( ) ) の範囲で、 直接非リスト初期化 により dynamic-extents [ d ] std:: as_const ( exts [ d ] ) で初期化する。それ以外の場合、すべての d について [ 0 , rank_dynamic ( ) ) の範囲で、直接非リスト初期化により dynamic-extents [ d ] std:: as_const ( exts [ dynamic-index-inv ( d ) ] ) で初期化する。
  • このオーバーロードは、以下の条件が満たされる場合にのみオーバーロード解決に参加する:
  • 以下の場合、動作は未定義である:
  • N ! = rank_dynamic ( ) かつ、いずれかの r について static_extent ( r ) が静的エクステントを表す場合に exts [ r ] static_extent ( r ) と等しくない場合、または
  • いずれかのランクインデックス r について exts [ r ] が負の値であるか、 IndexType 型の値として表現できない場合。

パラメータ

other - 変換元の別の extents
exts - エクステンツを表す

関連項目