title: "Erase and remove _if " removes just last items
body: <p>I am facing problem while calling erase and remove_if on vectors like this:</p>
  
  <pre><code>best_angle_inliers.erase(
      std::remove_if(begin(best_angle_inliers), end(best_angle_inliers),
          [](line_helper&lt;cv::Point&gt; const&amp; item){
              return item.the_line-&gt;segment_length() &lt; 20;
          }
      ), end(best_angle_inliers)
  );
  </code></pre>
  
  <p>Items that satisfy the condition and were placed originally at the back of the vectors are deleted. However, items that were placed originally in the middle were not deleted!</p>
  
  <p>I know that you can not reproduce from this draft code. But any tiny hint is appreciated.</p>