📌  相关文章
📜  c++ 从列表中删除多个项目 - C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:48.146000             🧑  作者: Mango

代码示例1
class Anything{
public:    int func() };

list lst = ;

//removes every element in list that returned true in line 9
lst.erase(std::remove_if(lst.begin(), lst.end(),
                       [&](const Anything lst)-> bool
                       { return lst.func() == something; }), //any condition
        lst.end());