<div dir="ltr">On 16 October 2013 10:06, Gabriel s too subtle for even most committee members, let alone mere mortals, to get right.Dos Reis <span dir="ltr">&lt;<a href="mailto:gdr@microsoft.com" target="_blank">gdr@microsoft.com</a>&gt;</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"><br><div class="im">
|       I would not have trouble telling people (especially notices): &quot;Ignore expect<br>
| talks<br>
|       about operator&lt; on pointers.  Prefer std::less&lt;T&gt;, unless you meant a<br>
| relationship<br>
|       between objects pointed to, in which use operator&lt;.  Mean what you say<br>
| and say<br>
|       what you mean.&quot;<br>
|<br>
|<br>
|<br>
| So what about std::less&lt;void&gt;?  Should people be using it?<br>
<br>
</div>What is wrong about it?<br></blockquote><div><br></div><div>It requires operator&lt;.  If people specialize std::less&lt;T&gt; instead adding an operator&lt;, it won&#39;t work.  It would be surprising that:<br><br>

</div><div>set&lt;T, less&lt;T&gt;&gt; works, but<br>set&lt;T, less&lt;&gt;&gt; does not.<br><br></div><div>One of the two motivations for this in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3421.htm">n3421</a> is to not require that the argument type in a comparator functor be explicitly specified, but that assumes there is an operator&lt; for the type, or possible compiler magic for pointer comparisons because of the ub issue.<br>

</div></div>-- <br> Nevin &quot;:-)&quot; Liber  &lt;mailto:<a href="mailto:nevin@eviloverlord.com" target="_blank">nevin@eviloverlord.com</a>&gt;  (847) 691-1404
</div></div>