@@ -1542,7 +1542,7 @@ namespace ranges {
1542
1542
// clang-format off
1543
1543
template <input_iterator _It, sentinel_for<_It> _Se, weakly_incrementable _Out>
1544
1544
requires indirectly_copyable<_It, _Out>
1545
- _NODISCARD constexpr copy_result<_It, _Out> _Copy_unchecked(_It _First, const _Se _Last, _Out _Result) {
1545
+ constexpr copy_result<_It, _Out> _Copy_unchecked(_It _First, const _Se _Last, _Out _Result) {
1546
1546
for (; _First != _Last; ++_First, (void) ++_Result) {
1547
1547
*_Result = *_First;
1548
1548
}
@@ -1734,6 +1734,17 @@ namespace ranges {
1734
1734
using move_result = in_out_result<_In, _Out>;
1735
1735
1736
1736
// VARIABLE ranges::move
1737
+ template <input_iterator _It, sentinel_for<_It> _Se, weakly_incrementable _Out>
1738
+ constexpr move_result<_It, _Out> _Move_unchecked(_It _First, const _Se _Last, _Out _Result) {
1739
+ _STL_INTERNAL_STATIC_ASSERT(indirectly_movable<_It, _Out>);
1740
+
1741
+ for (; _First != _Last; ++_First, (void) ++_Result) {
1742
+ *_Result = _RANGES iter_move(_First);
1743
+ }
1744
+
1745
+ return {_STD move(_First), _STD move(_Result)};
1746
+ }
1747
+
1737
1748
class _Move_fn : private _Not_quite_object {
1738
1749
public:
1739
1750
using _Not_quite_object::_Not_quite_object;
@@ -1760,21 +1771,6 @@ namespace ranges {
1760
1771
return {_STD move(_First), _STD move(_UResult.out)};
1761
1772
}
1762
1773
// clang-format on
1763
-
1764
- private:
1765
- template <class _It, class _Se, class _Out>
1766
- _NODISCARD static constexpr move_result<_It, _Out> _Move_unchecked(_It _First, const _Se _Last, _Out _Result) {
1767
- _STL_INTERNAL_STATIC_ASSERT(input_iterator<_It>);
1768
- _STL_INTERNAL_STATIC_ASSERT(sentinel_for<_Se, _It>);
1769
- _STL_INTERNAL_STATIC_ASSERT(weakly_incrementable<_Out>);
1770
- _STL_INTERNAL_STATIC_ASSERT(indirectly_movable<_It, _Out>);
1771
-
1772
- for (; _First != _Last; ++_First, (void) ++_Result) {
1773
- *_Result = _RANGES iter_move(_First);
1774
- }
1775
-
1776
- return {_STD move(_First), _STD move(_Result)};
1777
- }
1778
1774
};
1779
1775
1780
1776
inline constexpr _Move_fn move{_Not_quite_object::_Construct_tag{}};
@@ -3281,6 +3277,18 @@ namespace ranges {
3281
3277
using swap_ranges_result = in_in_result<_In1, _In2>;
3282
3278
3283
3279
// VARIABLE ranges::swap_ranges
3280
+ template <input_iterator _It1, sentinel_for<_It1> _Se1, input_iterator _It2, sentinel_for<_It2> _Se2>
3281
+ _NODISCARD constexpr swap_ranges_result<_It1, _It2> _Swap_ranges_unchecked(
3282
+ _It1 _First1, const _Se1 _Last1, _It2 _First2, const _Se2 _Last2) {
3283
+ _STL_INTERNAL_STATIC_ASSERT(indirectly_swappable<_It1, _It2>);
3284
+
3285
+ for (; _First1 != _Last1 && _First2 != _Last2; ++_First1, (void) ++_First2) {
3286
+ _RANGES iter_swap(_First1, _First2);
3287
+ }
3288
+
3289
+ return {_STD move(_First1), _STD move(_First2)};
3290
+ }
3291
+
3284
3292
class _Swap_ranges_fn : private _Not_quite_object {
3285
3293
public:
3286
3294
using _Not_quite_object::_Not_quite_object;
@@ -3317,22 +3325,6 @@ namespace ranges {
3317
3325
return {_STD move(_First1), _STD move(_First2)};
3318
3326
}
3319
3327
// clang-format on
3320
- private:
3321
- template <class _It1, class _Se1, class _It2, class _Se2>
3322
- _NODISCARD static constexpr swap_ranges_result<_It1, _It2> _Swap_ranges_unchecked(
3323
- _It1 _First1, const _Se1 _Last1, _It2 _First2, const _Se2 _Last2) {
3324
- _STL_INTERNAL_STATIC_ASSERT(input_iterator<_It1>);
3325
- _STL_INTERNAL_STATIC_ASSERT(sentinel_for<_Se1, _It1>);
3326
- _STL_INTERNAL_STATIC_ASSERT(input_iterator<_It2>);
3327
- _STL_INTERNAL_STATIC_ASSERT(sentinel_for<_Se2, _It2>);
3328
- _STL_INTERNAL_STATIC_ASSERT(indirectly_swappable<_It1, _It2>);
3329
-
3330
- for (; _First1 != _Last1 && _First2 != _Last2; ++_First1, (void) ++_First2) {
3331
- _RANGES iter_swap(_First1, _First2);
3332
- }
3333
-
3334
- return {_STD move(_First1), _STD move(_First2)};
3335
- }
3336
3328
};
3337
3329
3338
3330
inline constexpr _Swap_ranges_fn swap_ranges{_Not_quite_object::_Construct_tag{}};
0 commit comments