C++ Logo

SG12

Advanced search

Subject: Re: [ub] Justification for < not being a total order on pointers?
From: Nevin Liber (nevin_at_[hidden])
Date: 2013-10-16 09:54:02


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



SG12 list run by herb.sutter at gmail.com