C++ Logo

sg12

Advanced search

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

From: Gabriel Dos Reis <gdr_at_[hidden]>
Date: Wed, 16 Oct 2013 15:06:00 +0000
| -----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

Received on 2013-10-16 17:06:32