Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-02-09 10:58:52


From: "David Abrahams" <david.abrahams_at_[hidden]>
> Don't you really want a function template which compares arbitrary
> shared_ptr<T>, shared_ptr<U> by comparing the count objects, instead?

The current ==, != operators compare get(); there wasn't a particularly
strong reason to break backward compatibility by making them compare the
count.

> I don't think so. The above operator doesn't allow const_/non-const_
> iterator interoperability. Or are you suggesting that simply *adding* this
> definition is enough to avoid the problem. That would make plenty of
sense.

Yes, exactly.


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