title: How do I pass smart pointers into functions?
body: <p>When passing objects into functions, do the same rules apply to smart pointers as to other objects that contain dynamic memory?  </p>
  
  <p>When I pass, for example, a <code>std::vector&lt;std::string&gt;</code> into a function I always consider the following options:  </p>
  
  <ol>
  <li><p>I'm going to change the state of the vector object, but I <strong>do not</strong> want those changes reflected after the function has finished, AKA make a copy.  </p>
  
  <pre><code>void function(std::vector&lt;std::string&gt; vec);
  </code></pre></li>
  <li><p>I'm going to change the state of the vector object, and I <strong>do</strong> want those changes reflected after the function has finished, AKA make a reference.  </p>
  
  <pre><code>void function(std::vector&lt;std::string&gt; &amp; vec);
  </code></pre></li>
  <li><p>This object is pretty big, so I'd better pass a reference, but tell the compiler not to let me change it.  </p>
  
  <pre><code>void function(std::vector&lt;std::string&gt; const&amp; vec);  
  </code></pre></li>
  </ol>
  
  <p>Now is this the same logic with smart pointers? And when should I consider move semantics? Some guidelines on how I should pass smart pointers is what I desire most.</p>