|
Boost Users : |
From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2005-06-10 11:57:56
On 6/10/05, Sean Kelly <sean.kelly_at_[hidden]> wrote:
> is there any reason to prefer (i.e is it safer)
> some_utility(boost::shared_ptr<Foo> ptr)
> to
> some_utility(boost::shared_ptr<Foo>& ptr)
> or even
> some_utility(Foo& ref) (shared ptr is derefed and passed in)
It depends on what some_utility needs to do with the object. See some
Peter Dimov's reply to a similar question:
http://article.gmane.org/gmane.comp.lib.boost.devel/113132
-- Caleb Epstein caleb dot epstein at gmail dot 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