Is it possible for std::multimap::equal_range to return incorrect results?
问题 Good afternoon, I am finding that std:multimap::equal_range returns incorrect results sometimes. Is this possible? If so, is there a workaround or some error in my code or hash function for pointers. Thank you. Here is an excerpt of my code: typedef std::multimap<char *,Range>::const_iterator I; std::pair<I,I> b = mmultimap.equal_range(TmpPrevMapPtr); for (I i=b.first; i != b.second; ++i){ ranges_type.erase(i->second); } erasecount = mmultimap.erase(TmpPrevMapPtr); where mmultimap has a