Boost logo

Boost Users :

Subject: [Boost-users] shared_ptr as reference argument
From: anony (janezz55_at_[hidden])
Date: 2009-03-19 11:57:25


Is there some utility in passing shared_ptr's as references as here:

void bla(boost::shared_ptr<T>& bla_ptr);

This avoids creating of a new object and copying overhead, but is it
safe? When would you recommend it and when not?


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