std::extents<IndexType,Extents...>:: extents
|
constexpr
extents
(
)
=
default
;
|
(1) | (C++23以降) |
|
template
<
class
OtherIndexType,
std::
size_t
...
OtherExtents
>
constexpr
explicit
(
/*詳細は後述*/
)
|
(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
(
)
)
|
(4) | (C++23以降) |
|
template
<
class
OtherIndexType,
std::
size_t
N
>
constexpr
explicit
(
N
!
=
rank_dynamic
(
)
)
|
(5) | (C++23以降) |
extents
を構築します。
extents
は、保存されるすべての値である動的エクステントのみから、または事前条件付きのすべてのエクステントから構築できます。
extents
オブジェクトからの変換。構築後、
*
this
==
other
は
true
となる。
- 以下の場合、動作は未定義である:
-
- other. extent ( r ) ! = static_extent ( r ) が、 static_extent ( r ) が静的エクステントを表す任意の r に対して成り立つ場合、または
- other. extent ( r ) が IndexType 型の値として表現できない場合( other 内の任意のランク値 r に対して)。
- このオーバーロードは、以下の場合にのみオーバーロード解決に参加する:
-
- sizeof... ( OtherExtents ) == rank ( ) が true であり、かつ
-
(
(
OtherExtents
==
std::
dynamic_extent
||
Extents
==
std::
dynamic_extent
||
OtherExtents == Extents ) && ... ) が true である場合。
- このコンストラクタは、以下の場合に explicit となる:
-
- ( ( Extents ! = std:: dynamic_extent && OtherExtents == std:: dynamic_extent ) || ... ) が true である場合、または
- std:: numeric_limits < IndexType > :: max ( ) < std:: numeric_limits < OtherIndexType > :: max ( ) が true である場合。
- このオーバーロードは、以下の条件が満たされる場合にのみオーバーロード解決に参加する:
-
- ( std:: is_convertible_v < OtherIndexTypes, IndexType > && ... ) が true であること、
- ( std:: is_nothrow_constructible_v < IndexType, OtherIndexTypes > && ... ) が true であること、および
- N == rank_dynamic ( ) || N == rank ( ) が true であること。
- 以下の場合、動作は未定義である:
-
- N ! = rank_dynamic ( ) であり、かつ exts_arr [ r ] が static_extent ( r ) と等しくないような r が存在する場合( static_extent ( r ) が静的エクステントを表す場合)、または
- exts の要素が負の値であるか、 IndexType 型の値として表現できない場合。
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
)
]
)
で初期化する。
- このオーバーロードは、以下の条件が満たされる場合にのみオーバーロード解決に参加する:
-
- std:: is_convertible_v < const OtherIndexType & , IndexType > が true であること、
- std:: is_nothrow_constructible_v < IndexType, const OtherIndexType & > が true であること、および
- N == rank_dynamic ( ) || N == rank ( ) が true であること。
- 以下の場合、動作は未定義である:
-
- N ! = rank_dynamic ( ) かつ、いずれかの r について static_extent ( r ) が静的エクステントを表す場合に exts [ r ] が static_extent ( r ) と等しくない場合、または
- いずれかのランクインデックス r について exts [ r ] が負の値であるか、 IndexType 型の値として表現できない場合。
パラメータ
| other | - |
変換元の別の
extents
|
| exts | - | エクステンツを表す |
例
|
このセクションは不完全です
理由: 例がありません |
関連項目
|
|||