title: C++ reference to a shared_ptr vs reference
body: <p>All,</p>
  
  <p>I recently posted this <a href="https://stackoverflow.com/questions/1520018/c-dal-return-reference-or-populate-passed-in-reference">question</a> on DAL design.  From that it would seem that passing a reference to an object into a function, with the function then populating that object, would be a good interface for a C++ Data Access Layer, e.g.</p>
  
  <pre><code>  bool DAL::loadCar(int id, Car&amp; car) {} 
  </code></pre>
  
  <p>I'm now wondering if using a reference to a boost::shared_ptr would be better, e.g.</p>
  
  <pre><code>  bool DAL::loadCar(int id, boost::shared_ptr&lt;Car&gt; &amp;car)
  </code></pre>
  
  <p>Any thoughts?  Does one offer advantages over the other?  </p>
  
  <p>What would be the implications of applying const correctness to both calls?</p>
  
  <p>Thanks in advance.</p>