Boost logo

Boost :

From: williamkempf_at_[hidden]
Date: 2001-05-24 15:23:28


--- In boost_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:
> From: <williamkempf_at_h...>
>
> > --- In boost_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:
>
> > > No, it's never valid to have less<type> but not operator<. The
only
> > > exception is for pointers that don't point into the same array.
> >
> > A) That's the case here.
> > B) Never with an exception? Good rules don't work this way.
>
> We're stuck with the exception for other reasons but don't have to
introduce
> another.
>
> > C) There are plenty of other cases where this holds true. A
classic
> > example is std::type_info. Basically any type that doesn't not
have
> > full ordering but *can* have consistent partial ordering.
>
> But std::type_info is totally ordered. :-)

I used the wrong terminology here. I should have said strict-weak
ordered. The point still stands.

> > > shared_ptr is a bit different from a raw pointer. It reperesents
> > shared
> > > ownership. I ask the legitimate question "do pa and pb share
> > ownership?"
> >
> > I don't agree with this, but for some I guess it might be a valid
> > view point. *IF* there's a compelling enough reason to need this
> > however, it's still wrong to expose pn. Instead a same() method
(or
> > other more suitable name) should be exposed.
>
> Did you read the example in my original message?

Yes, I did.

Bill Kempf


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk