<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Aug 26, 2013, at 12:12 PM, Nevin Liber &lt;<a href="mailto:nevin@eviloverlord.com">nevin@eviloverlord.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">On 26 August 2013 11:00, Jeffrey Yasskin <span dir="ltr">&lt;<a href="mailto:jyasskin@google.com" target="_blank">jyasskin@google.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Could someone explain why we need to allow operator&lt;(T*) to be a non-order?<br></blockquote><div><br></div><div>It comes from C.&nbsp; I believe it comes from the days of segmented architectures.<br><br></div><div>I do not know of any modern machines that have such architectures and have C++11 compilers for them.&nbsp; Whenever it comes up for discussion on various reflectors, no one has mentioned one either.&nbsp; I for one would like to see this restriction go away.<br>

<br></div><div>Armchair thought:&nbsp; maybe we should propose a total ordering for pointers (for C++17 at this point) and see if anyone objects?<br><br><br></div><div>All that being said, I believe Library is inconsistent in its use of operator&lt; vs. std::less&lt;T&gt;, and that needs to be addressed separately.&nbsp; Pointers are the current poster child for the issue but user code might be specializing std::less as well.<br>

</div></div>-- <br>&nbsp;Nevin ":-)" Liber&nbsp; &lt;mailto:<a href="mailto:nevin@eviloverlord.com" target="_blank">nevin@eviloverlord.com</a>&gt;&nbsp; (847) 691-1404
</div></div></blockquote><br></div><div>Given that it is possible to reinterpret_cast a pointer to a large-enough integer and being able to cast back to get the original pointer, it seems like it should be possible to support operator&lt; on pointers.</div><div><br></div><div>John.</div><br></body></html>