Skip to content

Commit 8eb2c9e

Browse files
<mdspan>: Cite N4950 instead of N4944 (#3698)
1 parent 98a3f6a commit 8eb2c9e

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

stl/inc/mdspan

+41-41
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ public:
3333
using rank_type = size_t;
3434

3535
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).");
3737
static_assert(((_Extents == dynamic_extent || _STD in_range<index_type>(_Extents)) && ...),
3838
"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).");
4040

4141
static constexpr rank_type _Rank = sizeof...(_Extents);
4242
static constexpr rank_type _Rank_dynamic = (static_cast<rank_type>(_Extents == dynamic_extent) + ... + 0);
@@ -97,12 +97,12 @@ public:
9797
}
9898

9999
_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)");
101101
return _Static_extents[_Idx];
102102
}
103103

104104
_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)");
106106
if constexpr (rank_dynamic() == 0) {
107107
return static_cast<index_type>(_Static_extents[_Idx]);
108108
} else if constexpr (rank_dynamic() == rank()) {
@@ -129,10 +129,10 @@ public:
129129
_STL_VERIFY(
130130
_Static_extents[_Idx] == dynamic_extent || _STD cmp_equal(_Static_extents[_Idx], _Other.extent(_Idx)),
131131
"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)");
133133
_STL_VERIFY(_STD in_range<index_type>(_Other.extent(_Idx)),
134134
"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)");
136136

137137
if (_Static_extents[_Idx] == dynamic_extent) {
138138
*_It = static_cast<index_type>(_Other.extent(_Idx));
@@ -149,7 +149,7 @@ public:
149149
if constexpr ((_Is_standard_integer<_OtherIndexTypes> && ...)) {
150150
_STL_VERIFY(sizeof...(_Exts) == 0 || ((_Exts >= 0 && _STD in_range<index_type>(_Exts)) && ...),
151151
"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)");
153153
}
154154

155155
if constexpr (sizeof...(_Exts) == rank_dynamic()) {
@@ -161,7 +161,7 @@ public:
161161
_STL_VERIFY(
162162
_Static_extents[_Idx] == dynamic_extent || _STD cmp_equal(_Static_extents[_Idx], _Exts_arr[_Idx]),
163163
"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)");
165165
if (_Static_extents[_Idx] == dynamic_extent) {
166166
*_It = _Exts_arr[_Idx];
167167
++_It;
@@ -179,7 +179,7 @@ public:
179179
for (_OtherIndexType _Ext : _Exts) {
180180
_STL_VERIFY(_Ext >= 0 && _STD in_range<index_type>(_Ext),
181181
"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)");
183183
}
184184
}
185185
}
@@ -194,10 +194,10 @@ public:
194194
_STL_VERIFY(
195195
_Static_extents[_Idx] == dynamic_extent || _STD cmp_equal(_Static_extents[_Idx], _Exts[_Idx]),
196196
"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)");
198198
_STL_VERIFY(_Exts[_Idx] >= 0 && _STD in_range<index_type>(_Exts[_Idx]),
199199
"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)");
201201
}
202202
}
203203
}
@@ -311,10 +311,10 @@ public:
311311
using layout_type = layout_left;
312312

313313
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).");
315315
static_assert(extents_type::_Is_index_space_size_representable(),
316316
"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).");
318318

319319
constexpr mapping() noexcept = default;
320320
constexpr mapping(const mapping&) noexcept = default;
@@ -329,7 +329,7 @@ public:
329329
mapping(const mapping<_OtherExtents>& _Other) noexcept
330330
: _Exts(_Other.extents()) {
331331
_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 "
333333
"[mdspan.layout.left.cons]/4).");
334334
}
335335

@@ -339,7 +339,7 @@ public:
339339
mapping(const layout_right::mapping<_OtherExtents>& _Other) noexcept
340340
: _Exts(_Other.extents()) {
341341
_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 "
343343
"[mdspan.layout.left.cons]/7).");
344344
}
345345

@@ -358,10 +358,10 @@ public:
358358
}
359359
(make_index_sequence<extents_type::rank()>{});
360360
_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).");
362362
}
363363
_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 "
365365
"[mdspan.layout.left.cons]/10.2).");
366366
}
367367

@@ -410,7 +410,7 @@ public:
410410
requires (extents_type::rank() > 0)
411411
{
412412
_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).");
414414
return _Exts._Fwd_prod_of_extents(_Idx);
415415
}
416416

@@ -443,10 +443,10 @@ public:
443443
using layout_type = layout_right;
444444

445445
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).");
447447
static_assert(extents_type::_Is_index_space_size_representable(),
448448
"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).");
450450

451451
constexpr mapping() noexcept = default;
452452
constexpr mapping(const mapping&) noexcept = default;
@@ -461,7 +461,7 @@ public:
461461
mapping(const mapping<_OtherExtents>& _Other) noexcept
462462
: _Exts(_Other.extents()) {
463463
_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 "
465465
"[mdspan.layout.right.cons]/4).");
466466
}
467467

@@ -471,7 +471,7 @@ public:
471471
mapping(const layout_left::mapping<_OtherExtents>& _Other) noexcept
472472
: _Exts(_Other.extents()) {
473473
_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 "
475475
"[mdspan.layout.right.cons]/7).");
476476
}
477477

@@ -491,10 +491,10 @@ public:
491491
}
492492
(make_index_sequence<extents_type::rank()>{});
493493
_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).");
495495
}
496496
_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 "
498498
"[mdspan.layout.right.cons]/10.2).");
499499
}
500500

@@ -543,7 +543,7 @@ public:
543543
requires (extents_type::rank() > 0)
544544
{
545545
_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).");
547547
return _Exts._Rev_prod_of_extents(_Idx);
548548
}
549549

@@ -586,10 +586,10 @@ public:
586586
using layout_type = layout_stride;
587587

588588
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).");
590590
static_assert(extents_type::_Is_index_space_size_representable(),
591591
"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).");
593593

594594
constexpr mapping() noexcept : _Exts(extents_type{}) {
595595
if constexpr (extents_type::rank() != 0) {
@@ -612,7 +612,7 @@ public:
612612
for (rank_type _Idx = 0; _Idx < extents_type::_Rank; ++_Idx) {
613613
// TRANSITION CHECK [mdspan.layout.stride.cons]/4.2 (REQUIRES `_Multiply_with_overflow_check`)
614614
_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).");
616616
}
617617
}
618618

@@ -654,14 +654,14 @@ public:
654654
mapping(const _StridedLayoutMapping& _Other) noexcept
655655
: _Exts(_Other.extents()) {
656656
_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 "
658658
"[mdspan.layout.stride.cons]/7.3).");
659659
_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).");
661661
for (rank_type _Idx = 0; _Idx < extents_type::_Rank; ++_Idx) {
662662
const auto _Stride = _Other.stride(_Idx);
663663
_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).");
665665
_Strides[_Idx] = static_cast<index_type>(_Stride);
666666
}
667667
}
@@ -789,11 +789,11 @@ struct default_accessor {
789789
using data_handle_type = _ElementType*;
790790

791791
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).");
793793
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).");
795795
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).");
797797

798798
constexpr default_accessor() noexcept = default;
799799

@@ -827,15 +827,15 @@ public:
827827
using reference = typename accessor_type::reference;
828828

829829
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).");
831831
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).");
833833
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).");
835835
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).");
837837
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 "
839839
"[mdspan.mdspan.overview]/2.3).");
840840

841841
_NODISCARD static constexpr rank_type rank() noexcept {
@@ -907,10 +907,10 @@ public:
907907
mdspan(const mdspan<_OtherElementType, _OtherExtents, _OtherLayoutPolicy, _OtherAccessor>& _Other)
908908
: _Ptr(_Other._Ptr), _Map(_Other._Map), _Acc(_Other._Acc) {
909909
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 "
911911
"[mdspan.mdspan.cons]/20.1).");
912912
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).");
914914
}
915915

916916
constexpr mdspan& operator=(const mdspan&) = default;

0 commit comments

Comments
 (0)