<div dir="ltr">On 16 October 2013 16:15, Christopher Jefferson <span dir="ltr"><<a href="mailto:chris@bubblescope.net" target="_blank">chris@bubblescope.net</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>On 16 October 2013 00:14, Gabriel Dos Reis <<a href="mailto:gdr@microsoft.com" target="_blank">gdr@microsoft.com</a>> wrote:<br>
> Nevin --<br>
> Are you asking that operator< be a total order on std::deque<T>::iterator?<br>
><br>
<br>
</div>On a practical note, I believe this would arise naturally, if<br>
operator< was a total order on pointers.</blockquote><div><br></div><div>No, it does not. It would be a pessimization. As pointed out on the LWG reflector:<br><br><div class="gmail_quote"><blockquote>On 16 October 2013 13:25, Stephan T. Lavavej <span dir="ltr"><<a href="mailto:stl@exchange.microsoft.com" target="_blank">stl@exchange.microsoft.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
There is an efficiency concern here. Our deque iterators are represented
with a parent pointer and an index, and op< compares only the index
(same for op==). If we had to provide a total order, we'd need to insert
extra instructions.</blockquote></blockquote><div> </div></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Also at the moment there<br>
isn't an alternative, because there isn't a<br>
std::less<std::deque<T>::iterator>.<br></blockquote><div><br></div><div>(A) Sure there is; it just calls down to operator<.<br></div><div>(B) It doesn't provide any more of a guarantee of total ordering than operator< does.<br clear="all">
</div></div>-- <br> Nevin ":-)" Liber <mailto:<a href="mailto:nevin@eviloverlord.com" target="_blank">nevin@eviloverlord.com</a>> <a href="tel:%28847%29%20691-1404" value="+18476911404" target="_blank">(847) 691-1404</a>
</div></div>