title: Passing smart-pointers by reference
body: <p>Smart-pointers are generally tiny so passing by value isn't a problem, but is there any problem passing references to them; or rather are there specific cases where this mustn't be done?</p>
  
  <p>I'm writing a wrapper library and several of my classes wrap smart-pointer objects in the underlying library... my classes are not smart-pointers but the APIs currently pass smart-pointer objects by value.</p>
  
  <p>e.g current code:</p>
  
  <pre><code>void class::method(const AnimalPtr pAnimal) { ... }
  </code></pre>
  
  <p>becomes </p>
  
  <pre><code>void class::method(const MyAnimal &amp;animal){...}
  </code></pre>
  
  <p>where <code>MyAnimal</code> is my new wrapper class encapsulating <code>AnimalPtr</code>.</p>
  
  <p>There is no guarantee the Wrapper classes won't one day grow beyond wrapping a smart-pointer, so passing by value makes me nervous.</p>