How can one convert a shared_ptr that points to a const object to a shared_ptr that points to a non-const object. I am trying to do the following :
boost::shared_ptr<const A> Ckk(new A(4));
boost::shared_ptr<A> kk=const_cast< boost::shared_ptr<A> > Ckk;
But it does not work.