title: Should I use boost::ptr_vector<T> or vector<boost::shared_ptr<T> >?
body: <p>I need a container of pointers. Would you recommend <code>boost::ptr_vector&lt;T&gt;</code> or <code>std::vector&lt;boost::shared_ptr&lt;T&gt; &gt;</code>? (Or something else?)</p>
  
  <p>If that's of interest, my actual data structure is relatively complicated (see <a href="https://stackoverflow.com/questions/3771467/is-this-use-of-nested-vector-multimap-map-okay">here</a>) and currently stores objects, not pointers, but i'd like to change that (using pointer containers), in order to get rid of unnecessary copying:</p>
  
  <pre><code>typedef std::multimap&lt;Foo0, std::map&lt;int, double&gt; &gt; VecElem;
  std::vector&lt;VecElem&gt; vec;
  </code></pre>