lundi 4 janvier 2016

My set erase iterator outside range, but I have ensured it is't equal to end()

auto &t1 = g[w];
auto it=find_if(t1.begin(), t1.end(), [v](const pair<int, int> &p){ return p.first == v; });
if (it != t1.end()) 
    t1.erase(it);

Aucun commentaire:

Enregistrer un commentaire