|
Boost Users : |
Subject: [Boost-users] [smart_ptr] weak_ptr pointer semantics
From: Szymon Gatner (szymon.gatner_at_[hidden])
Date: 2011-11-10 19:20:52
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
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