How do I represent "const Object *" as a shared_ptr? Using "const shared_ptr<Object>" is not right, it makes the shared_ptr const, not the Object. Thanks, Jason
On Thu, Dec 4, 2008 at 4:43 PM, Jason Cipriani <jason.cipriani@gmail.com> wrote:
How do I represent "const Object *" as a shared_ptr? Using "const shared_ptr<Object>" is not right, it makes the shared_ptr const, not the Object.
Try shared_ptr<Object const> (or shared_ptr<const Object>) -- Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode
On Thu, Dec 4, 2008 at 7:58 PM, Steven Watanabe <watanabesj@gmail.com> wrote:
AMDG
Jason Cipriani wrote:
How do I represent "const Object *" as a shared_ptr? Using "const shared_ptr<Object>" is not right, it makes the shared_ptr const, not the Object.
shared_ptr<const Object>
Oh right. Thanks! Jason
participants (3)
-
Emil Dotchevski
-
Jason Cipriani
-
Steven Watanabe