Re: PR libstdc++/78420 Make std::less etc. yield total order for pointers

2018-03-22 Thread Jonathan Wakely
On 14 March 2018 at 23:01, Jonathan Wakely wrote: > Here's a very different patch. This gets rid of the __ptr_rel_ops and > just puts the special handling for pointers directly in the > std::less<_Tp*> etc. specializations. Then std::less uses > std::less for some pointer type P*. I've also

Re: PR libstdc++/78420 Make std::less etc. yield total order for pointers

2018-03-17 Thread Jonathan Wakely
On 14 March 2018 at 23:01, Jonathan Wakely wrote: > Here's a very different patch. This gets rid of the __ptr_rel_ops and > just puts the special handling for pointers directly in the > std::less<_Tp*> etc. specializations. Then std::less uses > std::less for some pointer type P*. I've also

Re: PR libstdc++/78420 Make std::less etc. yield total order for pointers

2018-03-14 Thread Jonathan Wakely
unk. This fixes a regression, but I'm not sure about backporting it yet, I haven't even tried testing it on the branches. commit 00c52c235b8dea85000f7b5e1dcff0526216a9a5 Author: Jonathan Wakely <jwak...@redhat.com> Date: Wed Mar 14 19:12:21 2018 +0000 PR libstdc++/78420 Make std::less e

Re: PR libstdc++/78420 Make std::less etc. yield total order for pointers

2018-03-13 Thread Jonathan Wakely
pointers by value, and 20.5.5.5 [member.functions] p2 allows us to do that. Here's a new patch with that change. commit e783a8e1c3cc0d41221796a9cadea796269a95a0 Author: Jonathan Wakely <jwak...@redhat.com> Date: Thu Mar 8 20:27:04 2018 + PR libstdc++/78420 Make std::less etc. yield total order f

PR libstdc++/78420 Make std::less etc. yield total order for pointers

2018-03-08 Thread Jonathan Wakely
018 +0000 PR libstdc++/78420 Make std::less etc. yield total order for pointers In order to meet the total order requirements of [comparisons] p2 we need to cast unrelated pointers to uintptr_t before comparing them. Those casts aren't allowed in constant expressions, so only c