
29 Apr
2008
29 Apr
'08
10:38 p.m.
On 4/29/08, Daniel Frey <d.frey@gmx.de> wrote:
I tried to do this and found one thing that I cannot do with the current implementation of weak_ptr: I cannot test if it's empty. It lacks the conversion to bool, similar to shared_ptr. Or is there any way to do this I missed? If you have an empty weak_ptr<foo> e, and another weak_ptr<foo> a, which you need to test for emptiness, you can use !(e<a) && !(a<e).
Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode