Boost logo

Boost Users :

From: Matt.Sullivan_at_[hidden]
Date: 2006-09-25 21:06:27


Phillip Hellewell <sshock_at_[hidden]> wrote on 25/09/2006 11:50:56 PM:

> I don't know for sure, but can't you convert the shard_ptr to a
> weak_ptr and write this:
> if( weak_ptr(shared_ptr) != weak_ptr )

No, there aren't any weak_ptr == or != operators either.

I could write:
  weak_ptr temp(shared_ptr);
  if ( !(temp < weak_ptr) && !(weak_ptr < temp))
to test for weak_ptr ownership equivalency, but I think I'll just
stick to the weak_ptr.lock().

thanks,
Matt


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