@@ -158,7 +158,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
158
158
inline constexpr size_t dynamic_extent = numeric_limits<size_t >::max();
159
159
template <typename _Tp, size_t _Extent = dynamic_extent> class span ;
160
160
161
-
162
161
template <class _Tp >
163
162
struct __is_std_array : false_type {};
164
163
@@ -171,7 +170,7 @@ struct __is_std_span : false_type {};
171
170
template <class _Tp , size_t _Sz>
172
171
struct __is_std_span <span<_Tp, _Sz>> : true_type {};
173
172
174
- #if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
173
+ #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
175
174
template <class _Range , class _ElementType >
176
175
concept __span_compatible_range =
177
176
ranges::contiguous_range<_Range> &&
@@ -181,7 +180,7 @@ concept __span_compatible_range =
181
180
!__is_std_array<remove_cvref_t <_Range>>::value &&
182
181
!is_array_v<remove_cvref_t <_Range>> &&
183
182
is_convertible_v<remove_reference_t <ranges::range_reference_t <_Range>>(*)[], _ElementType(*)[]>;
184
- #endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
183
+ #endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
185
184
186
185
template <typename _Tp, size_t _Extent>
187
186
class _LIBCPP_TEMPLATE_VIS span {
@@ -211,7 +210,6 @@ public:
211
210
constexpr span (const span&) noexcept = default;
212
211
constexpr span& operator =(const span&) noexcept = default ;
213
212
214
- #if _LIBCPP_STD_VER > 17
215
213
template <class _It ,
216
214
enable_if_t <contiguous_iterator<_It> &&
217
215
is_convertible_v<remove_reference_t <iter_reference_t <_It>>(*)[], element_type (*)[]>,
@@ -235,7 +233,6 @@ public:
235
233
_LIBCPP_ASSERT (__last - __first == _Extent,
236
234
" invalid range in span's constructor (iterator, sentinel): last - first != extent" );
237
235
}
238
- #endif // _LIBCPP_STD_VER > 17
239
236
240
237
_LIBCPP_INLINE_VISIBILITY constexpr span (type_identity_t <element_type> (&__arr)[_Extent]) noexcept : __data{__arr} {}
241
238
@@ -249,13 +246,13 @@ public:
249
246
_LIBCPP_INLINE_VISIBILITY
250
247
constexpr span(const array<_OtherElementType, _Extent>& __arr) noexcept : __data{__arr.data ()} {}
251
248
252
- #if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
249
+ #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
253
250
template <__span_compatible_range<element_type> _Range>
254
251
_LIBCPP_INLINE_VISIBILITY
255
252
constexpr explicit span (_Range&& __r) : __data{ranges::data (__r)} {
256
253
_LIBCPP_ASSERT (ranges::size (__r) == _Extent, " size mismatch in span's constructor (range)" );
257
254
}
258
- #endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
255
+ #endif
259
256
260
257
template <class _OtherElementType >
261
258
_LIBCPP_INLINE_VISIBILITY
@@ -402,7 +399,6 @@ public:
402
399
constexpr span (const span&) noexcept = default;
403
400
constexpr span& operator =(const span&) noexcept = default ;
404
401
405
- #if _LIBCPP_STD_VER > 17
406
402
template <class _It ,
407
403
enable_if_t <contiguous_iterator<_It> &&
408
404
is_convertible_v<remove_reference_t <iter_reference_t <_It> > (*)[], element_type (*)[]>,
@@ -419,7 +415,6 @@ public:
419
415
_LIBCPP_INLINE_VISIBILITY
420
416
constexpr span (_It __first, _End __last)
421
417
: __data(_VSTD::to_address(__first)), __size(__last - __first) {}
422
- #endif // _LIBCPP_STD_VER > 17
423
418
424
419
template <size_t _Sz>
425
420
_LIBCPP_INLINE_VISIBILITY
@@ -435,11 +430,11 @@ public:
435
430
_LIBCPP_INLINE_VISIBILITY
436
431
constexpr span(const array<_OtherElementType, _Sz>& __arr) noexcept : __data{__arr.data ()}, __size{_Sz} {}
437
432
438
- #if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
433
+ #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
439
434
template <__span_compatible_range<element_type> _Range>
440
435
_LIBCPP_INLINE_VISIBILITY
441
436
constexpr span (_Range&& __r) : __data(ranges::data(__r)), __size{ranges::size (__r)} {}
442
- #endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
437
+ #endif
443
438
444
439
template <class _OtherElementType , size_t _OtherExtent>
445
440
_LIBCPP_INLINE_VISIBILITY
@@ -544,13 +539,11 @@ private:
544
539
size_type __size;
545
540
};
546
541
547
- #if _LIBCPP_STD_VER > 17
548
542
template <class _Tp , size_t _Extent>
549
543
inline constexpr bool ranges::enable_borrowed_range<span<_Tp, _Extent> > = true ;
550
544
551
545
template <class _ElementType , size_t _Extent>
552
546
inline constexpr bool ranges::enable_view<span<_ElementType, _Extent>> = true ;
553
- #endif // _LIBCPP_STD_VER > 17
554
547
555
548
// as_bytes & as_writable_bytes
556
549
template <class _Tp , size_t _Extent>
@@ -579,7 +572,7 @@ template<class _Tp, size_t _Sz>
579
572
template <class _Tp , size_t _Sz>
580
573
span (const array<_Tp, _Sz>&) -> span<const _Tp, _Sz>;
581
574
582
- #if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
575
+ #if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
583
576
template <ranges::contiguous_range _Range>
584
577
span (_Range&&) -> span<remove_reference_t<ranges::range_reference_t<_Range>>>;
585
578
#endif
0 commit comments