Boost logo

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:

Caleb Epstein
caleb dot epstein at gmail dot com

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at