C++ Logo

SG12

Advanced search

Subject: Re: [ub] Justification for < not being a total order on pointers?
From: Gabriel Dos Reis (gdr_at_[hidden])
Date: 2013-10-16 10:06:00


| -----Original Message-----
| From: ub-bounces_at_[hidden] [mailto:ub-bounces_at_[hidden]] On Behalf
| Of Nevin Liber
| Sent: Wednesday, October 16, 2013 7:54 AM
| To: WG21 UB study group
| Subject: Re: [ub] Justification for < not being a total order on pointers?
|
| On 15 October 2013 18:10, Gabriel Dos Reis <gdr_at_[hidden]
| <mailto: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?

What is wrong about 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.

-- Gaby


SG12 list run by herb.sutter at gmail.com