@@ -3318,7 +3318,8 @@ namespace ranges
std::__niter_base(std::move(__last2)),
std::move(__comp),
std::move(__proj1), std::move(__proj2));
-
+ else
+ {
constexpr bool __sized_iters
= (sized_sentinel_for<_Sent1, _Iter1>
&& sized_sentinel_for<_Sent2, _Iter2>);
@@ -3342,7 +3343,8 @@ namespace ranges
{
if (const auto __len = std::min(__d1, __d2))
{
- const auto __c = std::__memcmp(__first1, __first2, __len);
+ const auto __c
+ = std::__memcmp(__first1, __first2, __len);
if constexpr (is_same_v<_Comp, ranges::less>)
{
if (__c < 0)
@@ -3378,6 +3380,7 @@ namespace ranges
}
return __first1 == __last1 && __first2 != __last2;
}
+ }
template<input_range _Range1, input_range _Range2,
typename _Proj1 = identity, typename _Proj2 = identity,
@@ -93,11 +93,8 @@ namespace ranges
std::__niter_base(std::move(__last2)),
std::move(__pred),
std::move(__proj1), std::move(__proj2));
-
- constexpr bool __sized_iters
- = (sized_sentinel_for<_Sent1, _Iter1>
- && sized_sentinel_for<_Sent2, _Iter2>);
- if constexpr (__sized_iters)
+ else if constexpr (sized_sentinel_for<_Sent1, _Iter1>
+ && sized_sentinel_for<_Sent2, _Iter2>)
{
auto __d1 = ranges::distance(__first1, __last1);
auto __d2 = ranges::distance(__first2, __last2);