📅  最后修改于: 2022-03-11 14:44:56.249000             🧑  作者: Mango
v.erase(std::remove_if(
v.begin(), v.end(),
[](const int& x) {
return x > 10; // put your condition here
}), v.end());
// therefore elements > 10 are removed, leaving only elements<= 10