title: Converting dozens of non-member functions to methods?
body: <p>Let's say we have some <code>class Foo</code> and we have many non-member functions that mutate vectors of <code>class Foo</code>; i.e:</p>
  
  <pre><code>void remove_duplicate_foos(std::vector&lt;Foo&gt;* foos_io) {
    std::vector&lt;Foo&gt;&amp; foos = &amp;foos_io;
    // removing duplicates
  }
  </code></pre>
  
  <p>Let's say we have dozens of functions like this that manipulate <code>Foo</code> vectors. So we roll up a class called <code>FooStore</code> that contains a vetor of <code>Foo</code> and has methods to manipulate that <code>Foo</code> vector.</p>
  
  <pre><code>class FooStore {
    public:
    void remove_duplicates() {
      ::remove_duplicates(&amp;foos);
    }
    private:
    std::vector&lt;Foo&gt; foos;
  }
  </code></pre>
  
  <p>Now, is there any handy way to do pretty much this dozens of times? Is it a bad idea to this? Should the function remain non-member only?</p>