title: Remove element from vector of maps
body: <p>I have a vector of maps:</p>
  
  <pre><code>typedef map&lt;string, string&gt; aMap;
  typedef vector&lt;aMap&gt; rVec;
  rVec rows;
  </code></pre>
  
  <p>How can I remove some elements from rows?</p>
  
  <p>The following code does not work.</p>
  
  <pre><code>struct remove_it
  {
    bool operator() (rVec&amp; rows)
    {
      // Validation code here!
  
    }
  };
  
  rVec::iterator it = remove(rows.begin(), rows.end(), remove_it());
  rows.erase(it, rows.end());
  </code></pre>
  
  <p>I got the following error.</p>
  
  <pre><code>error: no matching function for call to 'remove(std::vector&lt;s
  td::map&lt;std::basic_string&lt;char&gt;, std::basic_string&lt;char&gt; &gt; &gt;::iterator, std::vec
  tor&lt;std::map&lt;std::basic_string&lt;char&gt;, std::basic_string&lt;char&gt; &gt; &gt;::iterator, mai
  n(int, char**)::remove_it)'
  </code></pre>
  
  <p>Thanks.</p>