This repository was archived by the owner on Nov 27, 2025. It is now read-only.
Commit 3d353a3
[ADT] Require base equality in indexed_accessor_iterator::operator==() (#107856) (#64)
Similarly to operator<(), equality-comparing iterators from different
ranges must really be forbidden. The preconditions for being able to do
`it1 < it2` and `it1 != it2` (or `it1 == it2` for the matter) ought to
be the same. Thus, there's little sense in keeping explicit base object
comparison in operator==() whilst having this is a precondition in
operator<() and operator-() (e.g. used for std::distance() and such).
Co-authored-by: Andrei Golubev <[email protected]>1 parent 4bcc62f commit 3d353a3
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1194 | 1194 | | |
1195 | 1195 | | |
1196 | 1196 | | |
1197 | | - | |
| 1197 | + | |
| 1198 | + | |
1198 | 1199 | | |
1199 | 1200 | | |
1200 | 1201 | | |
| |||
0 commit comments