Skip to content

Commit 250aa73

Browse files
feature/spaceship: Clause 23: Iterators (#1645)
1 parent ad6688c commit 250aa73

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

stl/inc/iterator

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

305+
#if !_HAS_CXX20
305306
template <class _Ty, class _Elem, class _Traits, class _Diff>
306307
_NODISCARD bool operator!=(const istream_iterator<_Ty, _Elem, _Traits, _Diff>& _Left,
307308
const istream_iterator<_Ty, _Elem, _Traits, _Diff>& _Right) noexcept /* strengthened */ {
308309
return !(_Left == _Right);
309310
}
311+
#endif // !_HAS_CXX20
310312

311313
// CLASS TEMPLATE ostream_iterator
312314
template <class _Ty, class _Elem = char, class _Traits = char_traits<_Elem>>
@@ -488,11 +490,13 @@ _NODISCARD bool operator==(
488490
return _Left.equal(_Right);
489491
}
490492

493+
#if !_HAS_CXX20
491494
template <class _Elem, class _Traits>
492495
_NODISCARD bool operator!=(
493496
const istreambuf_iterator<_Elem, _Traits>& _Left, const istreambuf_iterator<_Elem, _Traits>& _Right) {
494497
return !(_Left == _Right);
495498
}
499+
#endif // !_HAS_CXX20
496500

497501
// CLASS TEMPLATE ostreambuf_iterator
498502
template <class _Elem, class _Traits>

tests/libcxx/expected_results.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,9 @@ std/utilities/memory/util.smartptr/util.smartptr.shared/libcxx.control_block_lay
671671
# Non-Standard assumption that std::filesystem::file_time_type::duration::period is std::nano
672672
std/input.output/filesystems/fs.filesystem.synopsis/file_time_type_resolution.compile.pass.cpp FAIL
673673

674+
# P1614R2 "Adding Spaceship <=> To The Library" makes `std::operator!=(i1, i3)` an error
675+
std/iterators/stream.iterators/istream.iterator/istream.iterator.ops/equal.pass.cpp FAIL
676+
674677

675678
# *** LIKELY STL BUGS ***
676679
# Not yet analyzed, likely STL bugs. Assertions and other runtime failures.

tests/libcxx/skipped_tests.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,9 @@ utilities\memory\util.smartptr\util.smartptr.shared\libcxx.control_block_layout.
671671
# Non-Standard assumption that std::filesystem::file_time_type::duration::period is std::nano
672672
input.output\filesystems\fs.filesystem.synopsis\file_time_type_resolution.compile.pass.cpp
673673

674+
# P1614R2 "Adding Spaceship <=> To The Library" makes `std::operator!=(i1, i3)` an error
675+
iterators\stream.iterators\istream.iterator\istream.iterator.ops\equal.pass.cpp
676+
674677

675678
# *** LIKELY STL BUGS ***
676679
# Not yet analyzed, likely STL bugs. Assertions and other runtime failures.

0 commit comments

Comments
 (0)