
12 Nov
2011
12 Nov
'11
9:47 a.m.
No, it isn't.
if( shared_ptr<> p = weak.lock() ) { p->thisWillNotAssert(); }
expired() should only be used for positive tests: if( weak.expired() ). Once a weak_ptr expires, it stays expired, so there is no potential for a race.
So that is a "no" on a get() thing? ;) Regards, Simon