Boost logo

Boost Users :

Subject: Re: [Boost-users] shared_ptr to const object
From: Emil Dotchevski (emil_at_[hidden])
Date: 2008-12-04 19:47:48


On Thu, Dec 4, 2008 at 4:43 PM, Jason Cipriani <jason.cipriani_at_[hidden]> 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

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