<div dir="ltr"><div>While true, such constructs can reduce code readability. Why not complete the set? The cost is minimal.<br><br></div>Thanks again,<br>Robert Ankeney<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 11, 2014 at 1:16 PM, Sean Silva <span dir="ltr"><<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 11, 2014 at 11:46 AM, Robert Ankeney <span dir="ltr"><<a href="mailto:rrankene@gmail.com" target="_blank">rrankene@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>There are times I find it useful to compare two SourceLocations in the same file. I've noticed the operators ==, != and < are all defined for SourceLocations, but not >, >= or <=. Is there any reason these are omitted? For now I'm having to make do with using getRawEncoding() to compare them</div></div></blockquote><div><br></div><div>Why? You can express the other 3 with just <.</div><div><br></div><div>x > y <==> y < x</div><div>x >= y <==> !(x < y)</div><div>x <= y <==> !(y < x)</div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div> and it would make the code look cleaner to avoid this. Of course I'm assuming the encoded value always increases as you go through the file, which seems to be the case.<br><br></div>Thanks,<br>Robert Ankeney<br></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div></div>
</blockquote></div><br></div>