title: how do I use STL algorithms with a vector of pointers
body: <p>I have a vector of pointers that are not owned by the container.  How do I use algorithms on the targets of the pointers.  I tried to use boost's ptr_vector, but it tries to delete the pointers when it goes out of scope.</p>
  
  <p>Here is some code that needs to work:</p>
  
  <pre><code>vector&lt;int*&gt; myValues;
  // ... myValues is populated
  bool consistent = count(myValues.begin(), myValues.end(), myValues.front()) == myValues.size();
  auto v = consistent ? myValues.front() : accumulate(myValues.begin(), myValues.end(), 0) / myValues.size();
  fill(myValues.begin(), myValues.end(), v);
  // etc.
  </code></pre>
  
  <p>I realize that for loops would work, but this happens in a bunch of places, so some kind of unary adapter?  I wasn't able to find one.  Thanks in advance!</p>