title: Remove object from vector based on object property
body: <p>I want to delete object from vector which has property set on specific value. In this example:</p>
  
  <pre><code>void RemoveUser(int val)
  {
      users.remove_if([val](User u)
      {
          return u.val == val;
      });
  }
  </code></pre>
  
  <p>I can remove specific user based on its <code>val</code> property. This works on <code>std::list</code>, but its not working on <code>std::vector</code>. How can I archieve same result on <code>vector</code>?</p>