@@ -33,10 +33,10 @@ public:
33
33
using rank_type = size_t;
34
34
35
35
static_assert(_Is_standard_integer<index_type>,
36
- "IndexType must be a signed or unsigned integer type (N4944 [mdspan.extents.overview]/1.1).");
36
+ "IndexType must be a signed or unsigned integer type (N4950 [mdspan.extents.overview]/1.1).");
37
37
static_assert(((_Extents == dynamic_extent || _STD in_range<index_type>(_Extents)) && ...),
38
38
"Each element of Extents must be either equal to dynamic_extent, or must be representable as a value of type "
39
- "IndexType (N4944 [mdspan.extents.overview]/1.2).");
39
+ "IndexType (N4950 [mdspan.extents.overview]/1.2).");
40
40
41
41
static constexpr rank_type _Rank = sizeof...(_Extents);
42
42
static constexpr rank_type _Rank_dynamic = (static_cast<rank_type>(_Extents == dynamic_extent) + ... + 0);
@@ -97,12 +97,12 @@ public:
97
97
}
98
98
99
99
_NODISCARD static constexpr size_t static_extent(const rank_type _Idx) noexcept {
100
- _STL_VERIFY(_Idx < _Rank, "Index must be less than rank() (N4944 [mdspan.extents.obs]/1)");
100
+ _STL_VERIFY(_Idx < _Rank, "Index must be less than rank() (N4950 [mdspan.extents.obs]/1)");
101
101
return _Static_extents[_Idx];
102
102
}
103
103
104
104
_NODISCARD constexpr index_type extent(const rank_type _Idx) const noexcept {
105
- _STL_VERIFY(_Idx < _Rank, "Index must be less than rank() (N4944 [mdspan.extents.obs]/3)");
105
+ _STL_VERIFY(_Idx < _Rank, "Index must be less than rank() (N4950 [mdspan.extents.obs]/3)");
106
106
if constexpr (rank_dynamic() == 0) {
107
107
return static_cast<index_type>(_Static_extents[_Idx]);
108
108
} else if constexpr (rank_dynamic() == rank()) {
@@ -129,10 +129,10 @@ public:
129
129
_STL_VERIFY(
130
130
_Static_extents[_Idx] == dynamic_extent || _STD cmp_equal(_Static_extents[_Idx], _Other.extent(_Idx)),
131
131
"Value of other.extent(r) must be equal to extent(r) for each r for which extent(r) is a static extent "
132
- "(N4944 [mdspan.extents.cons]/2.1)");
132
+ "(N4950 [mdspan.extents.cons]/2.1)");
133
133
_STL_VERIFY(_STD in_range<index_type>(_Other.extent(_Idx)),
134
134
"Value of other.extent(r) must be representable as a value of type index_type for every rank index r "
135
- "(N4944 [mdspan.extents.cons]/2.2)");
135
+ "(N4950 [mdspan.extents.cons]/2.2)");
136
136
137
137
if (_Static_extents[_Idx] == dynamic_extent) {
138
138
*_It = static_cast<index_type>(_Other.extent(_Idx));
@@ -149,7 +149,7 @@ public:
149
149
if constexpr ((_Is_standard_integer<_OtherIndexTypes> && ...)) {
150
150
_STL_VERIFY(sizeof...(_Exts) == 0 || ((_Exts >= 0 && _STD in_range<index_type>(_Exts)) && ...),
151
151
"Either sizeof...(exts) must be equal to 0 or each element of exts must be nonnegative and must be "
152
- "representable as value of type index_type (N4944 [mdspan.extents.cons]/7.2)");
152
+ "representable as value of type index_type (N4950 [mdspan.extents.cons]/7.2)");
153
153
}
154
154
155
155
if constexpr (sizeof...(_Exts) == rank_dynamic()) {
@@ -161,7 +161,7 @@ public:
161
161
_STL_VERIFY(
162
162
_Static_extents[_Idx] == dynamic_extent || _STD cmp_equal(_Static_extents[_Idx], _Exts_arr[_Idx]),
163
163
"Value of exts_arr[r] must be equal to extent(r) for each r for which extent(r) is a static extent "
164
- "(N4944 [mdspan.extents.cons]/7.1)");
164
+ "(N4950 [mdspan.extents.cons]/7.1)");
165
165
if (_Static_extents[_Idx] == dynamic_extent) {
166
166
*_It = _Exts_arr[_Idx];
167
167
++_It;
@@ -179,7 +179,7 @@ public:
179
179
for (_OtherIndexType _Ext : _Exts) {
180
180
_STL_VERIFY(_Ext >= 0 && _STD in_range<index_type>(_Ext),
181
181
"Either N must be zero or exts[r] must be nonnegative and must be representable as value of type "
182
- "index_type for every rank index r (N4944 [mdspan.extents.cons]/10.2)");
182
+ "index_type for every rank index r (N4950 [mdspan.extents.cons]/10.2)");
183
183
}
184
184
}
185
185
}
@@ -194,10 +194,10 @@ public:
194
194
_STL_VERIFY(
195
195
_Static_extents[_Idx] == dynamic_extent || _STD cmp_equal(_Static_extents[_Idx], _Exts[_Idx]),
196
196
"Value of exts[r] must be equal to extent(r) for each r for which extent(r) is a static extent "
197
- "(N4944 [mdspan.extents.cons]/10.1)");
197
+ "(N4950 [mdspan.extents.cons]/10.1)");
198
198
_STL_VERIFY(_Exts[_Idx] >= 0 && _STD in_range<index_type>(_Exts[_Idx]),
199
199
"Either N must be zero or exts[r] must be nonnegative and must be representable as value of type "
200
- "index_type for every rank index r (N4944 [mdspan.extents.cons]/10.2)");
200
+ "index_type for every rank index r (N4950 [mdspan.extents.cons]/10.2)");
201
201
}
202
202
}
203
203
}
@@ -311,10 +311,10 @@ public:
311
311
using layout_type = layout_left;
312
312
313
313
static_assert(_Is_extents<extents_type>,
314
- "Extents must be a specialization of std::extents (N4944 [mdspan.layout.left.overview]/2).");
314
+ "Extents must be a specialization of std::extents (N4950 [mdspan.layout.left.overview]/2).");
315
315
static_assert(extents_type::_Is_index_space_size_representable(),
316
316
"If Extents::rank_dynamic() == 0 is true, then the size of the multidimensional index space Extents() must be "
317
- "representable as a value of type typename Extents::index_type (N4944 [mdspan.layout.left.overview]/4).");
317
+ "representable as a value of type typename Extents::index_type (N4950 [mdspan.layout.left.overview]/4).");
318
318
319
319
constexpr mapping() noexcept = default;
320
320
constexpr mapping(const mapping&) noexcept = default;
@@ -329,7 +329,7 @@ public:
329
329
mapping(const mapping<_OtherExtents>& _Other) noexcept
330
330
: _Exts(_Other.extents()) {
331
331
_STL_VERIFY(_STD in_range<index_type>(_Other.required_span_size()),
332
- "Value of other.required_span_size() must be representable as a value of type index_type (N4944 "
332
+ "Value of other.required_span_size() must be representable as a value of type index_type (N4950 "
333
333
"[mdspan.layout.left.cons]/4).");
334
334
}
335
335
@@ -339,7 +339,7 @@ public:
339
339
mapping(const layout_right::mapping<_OtherExtents>& _Other) noexcept
340
340
: _Exts(_Other.extents()) {
341
341
_STL_VERIFY(_STD in_range<index_type>(_Other.required_span_size()),
342
- "Value of other.required_span_size() must be representable as a value of type index_type (N4944 "
342
+ "Value of other.required_span_size() must be representable as a value of type index_type (N4950 "
343
343
"[mdspan.layout.left.cons]/7).");
344
344
}
345
345
@@ -358,10 +358,10 @@ public:
358
358
}
359
359
(make_index_sequence<extents_type::rank()>{});
360
360
_STL_VERIFY(_Verify, "For all r in the range [0, extents_type::rank()), other.stride(r) must be equal to "
361
- "extents().fwd-prod-of-extents(r) (N4944 [mdspan.layout.left.cons]/10.1).");
361
+ "extents().fwd-prod-of-extents(r) (N4950 [mdspan.layout.left.cons]/10.1).");
362
362
}
363
363
_STL_VERIFY(_STD in_range<index_type>(_Other.required_span_size()),
364
- "Value of other.required_span_size() must be representable as a value of type index_type (N4944 "
364
+ "Value of other.required_span_size() must be representable as a value of type index_type (N4950 "
365
365
"[mdspan.layout.left.cons]/10.2).");
366
366
}
367
367
@@ -410,7 +410,7 @@ public:
410
410
requires (extents_type::rank() > 0)
411
411
{
412
412
_STL_VERIFY(_Idx < extents_type::_Rank,
413
- "Value of i must be less than extents_type::rank() (N4944 [mdspan.layout.left.obs]/6).");
413
+ "Value of i must be less than extents_type::rank() (N4950 [mdspan.layout.left.obs]/6).");
414
414
return _Exts._Fwd_prod_of_extents(_Idx);
415
415
}
416
416
@@ -443,10 +443,10 @@ public:
443
443
using layout_type = layout_right;
444
444
445
445
static_assert(_Is_extents<extents_type>,
446
- "Extents must be a specialization of std::extents (N4944 [mdspan.layout.right.overview]/2).");
446
+ "Extents must be a specialization of std::extents (N4950 [mdspan.layout.right.overview]/2).");
447
447
static_assert(extents_type::_Is_index_space_size_representable(),
448
448
"If Extents::rank_dynamic() == 0 is true, then the size of the multidimensional index space Extents() must be "
449
- "representable as a value of type typename Extents::index_type (N4944 [mdspan.layout.right.overview]/4).");
449
+ "representable as a value of type typename Extents::index_type (N4950 [mdspan.layout.right.overview]/4).");
450
450
451
451
constexpr mapping() noexcept = default;
452
452
constexpr mapping(const mapping&) noexcept = default;
@@ -461,7 +461,7 @@ public:
461
461
mapping(const mapping<_OtherExtents>& _Other) noexcept
462
462
: _Exts(_Other.extents()) {
463
463
_STL_VERIFY(_STD in_range<index_type>(_Other.required_span_size()),
464
- "Value of other.required_span_size() must be representable as a value of type index_type (N4944 "
464
+ "Value of other.required_span_size() must be representable as a value of type index_type (N4950 "
465
465
"[mdspan.layout.right.cons]/4).");
466
466
}
467
467
@@ -471,7 +471,7 @@ public:
471
471
mapping(const layout_left::mapping<_OtherExtents>& _Other) noexcept
472
472
: _Exts(_Other.extents()) {
473
473
_STL_VERIFY(_STD in_range<index_type>(_Other.required_span_size()),
474
- "Value of other.required_span_size() must be representable as a value of type index_type (N4944 "
474
+ "Value of other.required_span_size() must be representable as a value of type index_type (N4950 "
475
475
"[mdspan.layout.right.cons]/7).");
476
476
}
477
477
@@ -491,10 +491,10 @@ public:
491
491
}
492
492
(make_index_sequence<extents_type::rank()>{});
493
493
_STL_VERIFY(_Verify, "For all r in the range [0, extents_type::rank()), other.stride(r) must be equal to "
494
- "extents().rev-prod-of-extents(r) (N4944 [mdspan.layout.right.cons]/10.1).");
494
+ "extents().rev-prod-of-extents(r) (N4950 [mdspan.layout.right.cons]/10.1).");
495
495
}
496
496
_STL_VERIFY(_STD in_range<index_type>(_Other.required_span_size()),
497
- "Value of other.required_span_size() must be representable as a value of type index_type (N4944 "
497
+ "Value of other.required_span_size() must be representable as a value of type index_type (N4950 "
498
498
"[mdspan.layout.right.cons]/10.2).");
499
499
}
500
500
@@ -543,7 +543,7 @@ public:
543
543
requires (extents_type::rank() > 0)
544
544
{
545
545
_STL_VERIFY(_Idx < extents_type::_Rank,
546
- "Value of i must be less than extents_type::rank() (N4944 [mdspan.layout.right.obs]/6).");
546
+ "Value of i must be less than extents_type::rank() (N4950 [mdspan.layout.right.obs]/6).");
547
547
return _Exts._Rev_prod_of_extents(_Idx);
548
548
}
549
549
@@ -586,10 +586,10 @@ public:
586
586
using layout_type = layout_stride;
587
587
588
588
static_assert(_Is_extents<extents_type>,
589
- "Extents must be a specialization of std::extents (N4944 [mdspan.layout.stride.overview]/2).");
589
+ "Extents must be a specialization of std::extents (N4950 [mdspan.layout.stride.overview]/2).");
590
590
static_assert(extents_type::_Is_index_space_size_representable(),
591
591
"If Extents::rank_dynamic() == 0 is true, then the size of the multidimensional index space Extents() must be "
592
- "representable as a value of type typename Extents::index_type (N4944 [mdspan.layout.stride.overview]/4).");
592
+ "representable as a value of type typename Extents::index_type (N4950 [mdspan.layout.stride.overview]/4).");
593
593
594
594
constexpr mapping() noexcept : _Exts(extents_type{}) {
595
595
if constexpr (extents_type::rank() != 0) {
@@ -612,7 +612,7 @@ public:
612
612
for (rank_type _Idx = 0; _Idx < extents_type::_Rank; ++_Idx) {
613
613
// TRANSITION CHECK [mdspan.layout.stride.cons]/4.2 (REQUIRES `_Multiply_with_overflow_check`)
614
614
_STL_VERIFY(_Strides[_Idx] > 0, "Value of s[i] must be greater than 0 for all i in the range [0, rank_) "
615
- "(N4944 [mdspan.layout.stride.cons]/4.1).");
615
+ "(N4950 [mdspan.layout.stride.cons]/4.1).");
616
616
}
617
617
}
618
618
@@ -654,14 +654,14 @@ public:
654
654
mapping(const _StridedLayoutMapping& _Other) noexcept
655
655
: _Exts(_Other.extents()) {
656
656
_STL_VERIFY(_STD in_range<index_type>(_Other.required_span_size()),
657
- "Value of other.required_span_size() must be representable as a value of type index_type (N4944 "
657
+ "Value of other.required_span_size() must be representable as a value of type index_type (N4950 "
658
658
"[mdspan.layout.stride.cons]/7.3).");
659
659
_STL_VERIFY(
660
- _Offset(_Other) == 0, "Value of OFFSET(other) must be equal to 0 (N4944 [mdspan.layout.stride.cons]/7.4).");
660
+ _Offset(_Other) == 0, "Value of OFFSET(other) must be equal to 0 (N4950 [mdspan.layout.stride.cons]/7.4).");
661
661
for (rank_type _Idx = 0; _Idx < extents_type::_Rank; ++_Idx) {
662
662
const auto _Stride = _Other.stride(_Idx);
663
663
_STL_VERIFY(_Stride > 0, "Value of other.stride(r) must be greater than 0 for every rank index r of "
664
- "extents() (N4944 [mdspan.layout.stride.cons]/7.2).");
664
+ "extents() (N4950 [mdspan.layout.stride.cons]/7.2).");
665
665
_Strides[_Idx] = static_cast<index_type>(_Stride);
666
666
}
667
667
}
@@ -789,11 +789,11 @@ struct default_accessor {
789
789
using data_handle_type = _ElementType*;
790
790
791
791
static_assert(
792
- sizeof(element_type) > 0, "ElementType must be a complete type (N4944 [mdspan.accessor.default.overview]/2).");
792
+ sizeof(element_type) > 0, "ElementType must be a complete type (N4950 [mdspan.accessor.default.overview]/2).");
793
793
static_assert(!is_abstract_v<element_type>,
794
- "ElementType cannot be an abstract type (N4944 [mdspan.accessor.default.overview]/2).");
794
+ "ElementType cannot be an abstract type (N4950 [mdspan.accessor.default.overview]/2).");
795
795
static_assert(
796
- !is_array_v<element_type>, "ElementType cannot be an array type (N4944 [mdspan.accessor.default.overview]/2).");
796
+ !is_array_v<element_type>, "ElementType cannot be an array type (N4950 [mdspan.accessor.default.overview]/2).");
797
797
798
798
constexpr default_accessor() noexcept = default;
799
799
@@ -827,15 +827,15 @@ public:
827
827
using reference = typename accessor_type::reference;
828
828
829
829
static_assert(
830
- sizeof(element_type) > 0, "ElementType must be a complete type (N4944 [mdspan.mdspan.overview]/2.1).");
830
+ sizeof(element_type) > 0, "ElementType must be a complete type (N4950 [mdspan.mdspan.overview]/2.1).");
831
831
static_assert(
832
- !is_abstract_v<element_type>, "ElementType cannot be an abstract type (N4944 [mdspan.mdspan.overview]/2.1).");
832
+ !is_abstract_v<element_type>, "ElementType cannot be an abstract type (N4950 [mdspan.mdspan.overview]/2.1).");
833
833
static_assert(
834
- !is_array_v<element_type>, "ElementType cannot be an array type (N4944 [mdspan.mdspan.overview]/2.1).");
834
+ !is_array_v<element_type>, "ElementType cannot be an array type (N4950 [mdspan.mdspan.overview]/2.1).");
835
835
static_assert(_Is_extents<extents_type>,
836
- "Extents must be a specialization of std::extents (N4944 [mdspan.mdspan.overview]/2.2).");
836
+ "Extents must be a specialization of std::extents (N4950 [mdspan.mdspan.overview]/2.2).");
837
837
static_assert(is_same_v<element_type, typename accessor_type::element_type>,
838
- "ElementType and typename AccessorPolicy::element_type must be the same type (N4944 "
838
+ "ElementType and typename AccessorPolicy::element_type must be the same type (N4950 "
839
839
"[mdspan.mdspan.overview]/2.3).");
840
840
841
841
_NODISCARD static constexpr rank_type rank() noexcept {
@@ -907,10 +907,10 @@ public:
907
907
mdspan(const mdspan<_OtherElementType, _OtherExtents, _OtherLayoutPolicy, _OtherAccessor>& _Other)
908
908
: _Ptr(_Other._Ptr), _Map(_Other._Map), _Acc(_Other._Acc) {
909
909
static_assert(is_constructible_v<data_handle_type, const typename _OtherAccessor::data_handle_type&>,
910
- "The data_handle_type must be constructible from const typename OtherAccessor::data_handle_type& (N4944 "
910
+ "The data_handle_type must be constructible from const typename OtherAccessor::data_handle_type& (N4950 "
911
911
"[mdspan.mdspan.cons]/20.1).");
912
912
static_assert(is_constructible_v<extents_type, _OtherExtents>,
913
- "The extents_type must be constructible from OtherExtents (N4944 [mdspan.mdspan.cons]/20.2).");
913
+ "The extents_type must be constructible from OtherExtents (N4950 [mdspan.mdspan.cons]/20.2).");
914
914
}
915
915
916
916
constexpr mdspan& operator=(const mdspan&) = default;
0 commit comments