Boost Users :
From: Stuart Dootson (stuart.dootson_at_[hidden])
Date: 2005-01-25 02:37:14
On Mon, 24 Jan 2005 17:09:10 -0800, Brian McCandless <bmccandl_at_[hidden]> wrote:
> I just upgraded from boost 1.29 to boost 1.32, and found that operator== for
> weak_ptr has been dropped between these versions. My code uses std::find to
> find a weak_ptr in a container. This no longer compiles (g++-3.4.1) since find
> uses operator==. Has anyone else encountered this kind of problem? What are
> some good workarounds? Could operator== be put back?
Make use weak_ptr::operator< (which IS in 1.32) by using
std::lower_bound. You'll still have to check for 'equality' of the
returned pointer (use !(A<B || B<A) for that).
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net