mercredi 25 mars 2015

why this std::bind fails?

What is the fault of this bind operation with visual studio 2013 for error C3867 ?



#include <map>
#include <vector>
#include <algorithm>
#include <functional>

int main()
{
std::map<int, int> m1, m2;
std::vector<std::map<int, int> *> pM;

std::for_each(pM.begin(), pM.end(),
std::bind(std::map<int, int>::erase , 1));
}

Aucun commentaire:

Enregistrer un commentaire