Date: Wed, 16 Oct 2013 22:27:32 +0000
Yep - I intended for less<void> to simply be op< in functor form, with no additional semantics.
Separately, I believe that the Core Language should simply recognize the fact that all machines these days have a flat memory model. (Two's complement and 8-bit bytes would be nice too.)
STL
-----Original Message-----
From: Jeffrey Yasskin [mailto:jyasskin_at_[hidden]]
Sent: Wednesday, October 16, 2013 3:14 PM
To: WG21 UB study group; Stephan T. Lavavej
Subject: Re: [ub] Justification for < not being a total order on pointers?
On Wed, Oct 16, 2013 at 3:03 PM, Nevin Liber <nevin_at_[hidden]> wrote:
> On 16 October 2013 16:51, Christopher Jefferson <chris_at_[hidden]>
> wrote:
>>
>>
>>
>> Oh, I did not realise that. I assume those weasel words are:
>>
>> 20.10.5: 14 For templates greater, less, greater_equal, and
>> less_equal, the specializations for any pointer type yield a total
>> order, even if the built-in operators <, >, <=, >= do not.
>>
>> I did not think that applied for the std::less<void> specialisation,
>> but I can imagine how you could read that it did.
>
>
> Hmmm... I think you are right... although I thought the intention was it
> works for less<void>.
IIRC, Stephan intentionally left the weasel-words out of
std::less<void>, and we've discussed that choice before and generally
found it reasonable.
Separately, I believe that the Core Language should simply recognize the fact that all machines these days have a flat memory model. (Two's complement and 8-bit bytes would be nice too.)
STL
-----Original Message-----
From: Jeffrey Yasskin [mailto:jyasskin_at_[hidden]]
Sent: Wednesday, October 16, 2013 3:14 PM
To: WG21 UB study group; Stephan T. Lavavej
Subject: Re: [ub] Justification for < not being a total order on pointers?
On Wed, Oct 16, 2013 at 3:03 PM, Nevin Liber <nevin_at_[hidden]> wrote:
> On 16 October 2013 16:51, Christopher Jefferson <chris_at_[hidden]>
> wrote:
>>
>>
>>
>> Oh, I did not realise that. I assume those weasel words are:
>>
>> 20.10.5: 14 For templates greater, less, greater_equal, and
>> less_equal, the specializations for any pointer type yield a total
>> order, even if the built-in operators <, >, <=, >= do not.
>>
>> I did not think that applied for the std::less<void> specialisation,
>> but I can imagine how you could read that it did.
>
>
> Hmmm... I think you are right... although I thought the intention was it
> works for less<void>.
IIRC, Stephan intentionally left the weasel-words out of
std::less<void>, and we've discussed that choice before and generally
found it reasonable.
Received on 2013-10-17 00:43:31