
11 Nov
2011
11 Nov
'11
12:20 a.m.
Hi, Why weak_ptr does not have (smart) pointer semantics? No * or -> or even get(). I often need a pointer type that is a listener to shared_ptr<> (does not affect refcount) but is still usable as a regular pointer type. If providing * and -> operators is for some reason undesirable then just a get() member would be nice as it would allow to implement own wrapper with pointer semantics. get() would return raw pointer from shared counter (so is fast) and not shared_ptr<> as lock() does. -- Szymon Gatner The Lordz Games Studio www.thelordzgamesstudio.com