
17 Mar
2011
17 Mar
'11
10:24 a.m.
On Thu, Mar 17, 2011 at 10:56 AM, Joshua Juran <jjuran@gmail.com> wrote:
Is there a reason to pass the shared_ptr by value instead of const reference?
I'm not sure. After reading several discussions on the web [1,2] I concluded that I'll stick with by-value. [1] http://stackoverflow.com/questions/327573/c-passing-references-to-boostshare... [2] http://stackoverflow.com/questions/3310737/shared-ptr-by-reference-or-by-val... At a certain point of time in the past this was included in boost.shared_ptr documentation. I quickly skimmed over the docs but couldn't find any reference. Best regards, Christoph