Skip to content

Commit e56b1ba

Browse files
committed
added one small iterator change
1 parent 1e345fb commit e56b1ba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

stl/inc/iterator

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,13 @@ _NODISCARD bool operator==(const istream_iterator<_Ty, _Elem, _Traits, _Diff>& _
292292
return _Left._Equal(_Right);
293293
}
294294

295+
#if !_HAS_CXX20 || __cpp_impl_three_way_comparison < 201902L
295296
template <class _Ty, class _Elem, class _Traits, class _Diff>
296297
_NODISCARD bool operator!=(const istream_iterator<_Ty, _Elem, _Traits, _Diff>& _Left,
297298
const istream_iterator<_Ty, _Elem, _Traits, _Diff>& _Right) {
298299
return !(_Left == _Right);
299300
}
301+
#endif // !_HAS_CXX20 || __cpp_impl_three_way_comparison < 201902L
300302

301303
// CLASS TEMPLATE ostream_iterator
302304
template <class _Ty, class _Elem = char, class _Traits = char_traits<_Elem>>
@@ -458,11 +460,13 @@ _NODISCARD bool operator==(
458460
return _Left.equal(_Right);
459461
}
460462

463+
#if !_HAS_CXX20 || __cpp_impl_three_way_comparison < 201902L
461464
template <class _Elem, class _Traits>
462465
_NODISCARD bool operator!=(
463466
const istreambuf_iterator<_Elem, _Traits>& _Left, const istreambuf_iterator<_Elem, _Traits>& _Right) {
464467
return !(_Left == _Right);
465468
}
469+
#endif // !_HAS_CXX20 || __cpp_impl_three_way_comparison < 201902L
466470

467471
// CLASS TEMPLATE ostreambuf_iterator
468472
template <class _Elem, class _Traits>

0 commit comments

Comments
 (0)