<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 2, 2015 at 8:35 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb adM"><div class="">> For `==` and `!=, you shouldn't worry about whether the handle is in sync<br>
> with the debug base -- if anything, you should just check that the two<br>
> handles are pointing at the same debug base (and have the same epoch as<br>
> each other). (But I still don't see how you've modified `==` or `!=`.)<br>
><br>
> The comparison operators call operator-><br>
<br>
</div></div>(Sorry, should have just looked at the code myself.)<br>
<br>
That's silly though. They should just be:<br>
<br>
bool operator==(const ConstIterator &RHS) const { return Ptr == RHS.Ptr; }<br>
bool operator!=(const ConstIterator &RHS) const { return Ptr != RHS.Ptr; }<br>
<br>
Calling `->` is needlessly complicated.</blockquote></div><br>Sure.</div><div class="gmail_extra"><br></div><div class="gmail_extra">But I think we *should* check the epoch here as comparing an invalid iterator with a valid iterator should also be caught. I would check that the address of the epoch are the same, and if they are non-null, that all three epoch's (the pointed too and both iterator's copies) are in sync.</div></div>