std::extents<IndexType,Extents...>:: extents
|
constexpr
extents
(
)
=
default
;
|
(1) | (seit C++23) |
|
template
<
class
OtherIndexType,
std::
size_t
...
OtherExtents
>
constexpr
explicit
(
/*siehe unten*/
)
|
(2) | (seit C++23) |
|
template
<
class
...
OtherIndexTypes
>
constexpr explicit extents ( OtherIndexTypes... exts ) noexcept ; |
(3) | (seit C++23) |
|
template
<
class
OtherIndexType,
std::
size_t
N
>
constexpr
explicit
(
N
!
=
rank_dynamic
(
)
)
|
(4) | (seit C++23) |
|
template
<
class
OtherIndexType,
std::
size_t
N
>
constexpr
explicit
(
N
!
=
rank_dynamic
(
)
)
|
(5) | (seit C++23) |
Konstruieren Sie einen
extents
. Man kann
extents
entweder nur aus dynamischen Extents konstruieren, wobei alle Werte gespeichert werden, oder aus allen Extents mit einer Vorbedingung.
extents
-Objekt. Nach der Konstruktion ist
*
this
==
other
true
.
- Das Verhalten ist undefiniert, wenn
-
- other. extent ( r ) ! = static_extent ( r ) für irgendein r gilt, für das static_extent ( r ) eine statische Ausdehnung repräsentiert, oder
- other. extent ( r ) nicht als Wert vom Typ IndexType darstellbar ist für irgendeinen Rangwert r in other .
- Diese Überladung nimmt nur dann an der Überladungsauflösung teil, wenn
-
- sizeof... ( OtherExtents ) == rank ( ) true ist, und
-
(
(
OtherExtents
==
std::
dynamic_extent
||
Extents
==
std::
dynamic_extent
||
OtherExtents == Extents ) && ... ) true ist.
- Dieser Konstruktor ist explicit , wenn
-
- ( ( Extents ! = std:: dynamic_extent && OtherExtents == std:: dynamic_extent ) || ... ) true ist, oder
- std:: numeric_limits < IndexType > :: max ( ) < std:: numeric_limits < OtherIndexType > :: max ( ) true ist.
- Diese Überladung nimmt nur dann an der Überladungsauflösung teil, wenn
-
- ( std:: is_convertible_v < OtherIndexTypes, IndexType > && ... ) gleich true ist,
- ( std:: is_nothrow_constructible_v < IndexType, OtherIndexTypes > && ... ) gleich true ist, und
- N == rank_dynamic ( ) || N == rank ( ) gleich true ist.
- Das Verhalten ist undefiniert, wenn
-
- N ! = rank_dynamic ( ) und exts_arr [ r ] ungleich static_extent ( r ) ist für irgendein r , für das static_extent ( r ) eine statische Ausdehnung repräsentiert, oder
- ein Element in exts negativ ist oder nicht als Wert des Typs IndexType darstellbar ist.
[
0
,
rank_dynamic
(
)
)
,
direkt-nicht-Liste-initialisiert
dynamic-extents
[
d
]
mit
std::
as_const
(
exts
[
d
]
)
. Andernfalls wird für alle
d
im Bereich
[
0
,
rank_dynamic
(
)
)
, direkt-nicht-Liste-initialisiert
dynamic-extents
[
d
]
mit
std::
as_const
(
exts
[
dynamic-index-inv
(
d
)
]
)
.
- Diese Überladung nimmt nur dann an der Überladungsauflösung teil, wenn
-
- std:: is_convertible_v < const OtherIndexType & , IndexType > wahr ist,
- std:: is_nothrow_constructible_v < IndexType, const OtherIndexType & > wahr ist, und
- N == rank_dynamic ( ) || N == rank ( ) wahr ist.
- Das Verhalten ist undefiniert, falls
-
- N ! = rank_dynamic ( ) und exts [ r ] ungleich static_extent ( r ) ist für irgendein r , für das static_extent ( r ) eine statische Ausdehnung repräsentiert, oder
- exts [ r ] negativ ist oder nicht als Wert vom Typ IndexType darstellbar ist für irgendeinen Rangindex r .
Parameter
| other | - |
ein weiteres
extents
zur Konvertierung
|
| exts | - | repräsentiert die Extents |
Beispiel
|
Dieser Abschnitt ist unvollständig
Grund: Kein Beispiel |
Siehe auch
|
|||