Re: [boost] Please don't define a fake "operator <" justfororderedcontainers

11 Jul
2006
11 Jul
'06
12:13 a.m.
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of me22 Sent: Monday, July 10, 2006 5:07 PM To: boost@lists.boost.org Subject: Re: [boost] Please don't define a fake "operator <" justfororderedcontainers
On 7/10/06, Sohail Somani <s.somani@fincad.com> wrote:
Isn't shared_ptr<T> is supposed to be like T* which has ordering? In this case, it's a non-issue no?
My understanding is that < is only well-defined for pointers into the same array and that < between to arbitrary pointers is otherwise some sort of UB.
It's less<T*> that provides a full ordering for arbitrary T*s. (By specialising std::less.)
This is true.
6912
Age (days ago)
6912
Last active (days ago)
0 comments
1 participants
participants (1)
-
Sohail Somani