Subject: Re: [ub] Justification for < not being a total order on pointers?
From: Gabriel Dos Reis (gdr_at_[hidden])
Date: 2013-10-17 09:32:09
Nevin Liber <nevin_at_[hidden]> writes:
| On 16 October 2013 10:50, Gabriel Dos Reis <gdr_at_[hidden]> wrote:
| Exactly! I said std::less<std::complex<MyFloat>>, which has always been
| supposed to be user-provided, when defined. Â Since C++98.
| Where is the text in the standard or TR/TS (which is the only official
| communication between the committee and developers) which states that?
You just quoted the relevant part below. What specifically different
were you looking for?
| All I can find in n3797 is 18.104.22.168.1p1: "A program may add a template
| for any standard library template to namespace std only if the declaration
| depends on a user-defined type
| and the specialization meets the standard library requirements for the original
| template and is not explicitly
| Unless we are willing to say that std::less<T> has no requirements, I don't see
| how we give permission for specializing that in a way which does not match
In the C++98 text, exactly which requirement a user-specialization of
do you believe was violated?
| Â And codes
| like that exist.
| That is certainly true.Â Users are clever whether or not they are on the
| committee. :-)
| Â The relation with your argument is that those C++98
| codes will continue to work today with C++11, while the version with
| less<void> will fail. Miresably.
| Like I said, it's a long term plan...
SG12 list run by herb.sutter at gmail.com