
AMDG fmingu wrote:
According to your suggestion,I tried to write: bind(static_cast<pair<IIPrimemap::iterator,bool> (*)(const IIPrimemap::value_type&)> (IIPrimemap::insert), bind(&make_pair<int,int>,_1,constant(1))); where typedef std::map<int, int> IIPrimemap; IIPrimemap primemapvec;
but the complier told me that: invalid static_cast from type `<unknown type>' to type ` std::pair<std::_Rb_tree_iterator<std::pair<const int, int>, std::pair<const int, int>&, std::pair<const int, int>*>, bool> (*)(const std::pair<const int, int>&)' Can you tell me why?
IIPrimemap::insert is a member function. The syntax for a pointer to a member function is <return type> (<class name>::*)(<args>) In Christ, Steven Watanabe