title: std::vector removing elements which fulfill some conditions
body: <p>As the title says I want to remove/merge objects in a vector which fulfill specific conditions. I mean I know how to remove integers from a vector which have the value 99 for instance.</p>
  
  <p>The remove idiom by Scott Meyers:</p>
  
  <pre><code>vector&lt;int&gt; v;
  v.erase(remove(v.begin(), v.end(), 99), v.end());
  </code></pre>
  
  <p>But suppose if have a vector of objects which contains a delay member variable. And now I want to eliminate all objects which delays differs only less than a specific threshold and want to combine/merge them to one object.</p>
  
  <p>The result of the process should be a vector of objects where the difference of all delays  should be at least the specified threshold. </p>