Purpose of const boost :: shared_ptr <T> & as function argument?
I am using some large and well-supported open source C ++ library and have come across a class definition having a form constructor
class SomeClass { SomeClass( const boost::shared_ptr<SomeOtherClass>& ); }
My question is: what is the transmission point of const boost::shared_ptr<T>
by reference? Is there really a really small amount of overhead associated with passing boost::shared_ptr<T>
by value, or is there any other danger to passing boost::shared_ptr<T>
by value that I donβt know about?
+4
3 answers