C++ Logo

sg12

Advanced search

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

From: Nevin Liber <nevin_at_[hidden]>
Date: Wed, 16 Oct 2013 17:03:37 -0500
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>.
-- 
 Nevin ":-)" Liber  <mailto:nevin_at_[hidden]>  (847) 691-1404

Received on 2013-10-17 00:04:18