C++ Logo

sg12

Advanced search

Re: [ub] Justification for < not being a total order on pointers?

From: Nevin Liber <nevin_at_[hidden]>
Date: Wed, 16 Oct 2013 09:54:02 -0500
On 15 October 2013 18:10, Gabriel Dos Reis <gdr_at_[hidden]> wrote:

> I would not have trouble telling people (especially notices): "Ignore
> expect talks
> about operator< on pointers. Prefer std::less<T>, unless you meant a
> relationship
> between objects pointed to, in which use operator<. Mean what you say and
> say
> what you mean."
>

So what about std::less<void>? Should people be using it? This is not a
theoretical question, as there are committee members who recommend it over
std::less<T>, and book authors might start doing it as well.
-- 
 Nevin ":-)" Liber  <mailto:nevin_at_[hidden]>  (847) 691-1404

Received on 2013-10-16 16:54:48