How can I check if an element of a multimap exists?
With this code:
typedef std::multimap<std::string, std::string> TagVal;
TagVal tv;
//... add values to tv ...
TagVal::const_iterator it = tv.find("abc");
if(it == TagVal::end()) // <--- ERROR
cerr << "Error";
I get the following compile time error:
error: cannot call member function 'std::multimap<...>::iterator std::multimap<...>::end() ... without object.
Platform: Linux, GCC 4.5.1