<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"><<a href="mailto:gdr@microsoft.com" target="_blank">gdr@microsoft.com</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"><br><div class="im">
| I would not have trouble telling people (especially notices): "Ignore expect<br>
| talks<br>
| about operator< on pointers. Prefer std::less<T>, unless you meant a<br>
| relationship<br>
| between objects pointed to, in which use operator<. Mean what you say<br>
| and say<br>
| what you mean."<br>
|<br>
|<br>
|<br>
| So what about std::less<void>? Should people be using it?<br>
<br>
</div>What is wrong about it?<br></blockquote><div><br></div><div>It requires operator<. If people specialize std::less<T> instead adding an operator<, it won't work. It would be surprising that:<br><br>
</div><div>set<T, less<T>> works, but<br>set<T, less<>> 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< for the type, or possible compiler magic for pointer comparisons because of the ub issue.<br>
</div></div>-- <br> Nevin ":-)" Liber <mailto:<a href="mailto:nevin@eviloverlord.com" target="_blank">nevin@eviloverlord.com</a>> (847) 691-1404
</div></div>