@@ -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
295296template <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
302304template <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
461464template <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
468472template <class _Elem, class _Traits>
0 commit comments