boost::bind question
Hi, I've a std::map with the following structure. std::map < int, tuple<std::string, std::string> > mapTuple ; typedef map < int, tuple<string, string> > mapTuple ; Now i've say 10 elements in this container. Now i'd like to iterate thru this container and find a specific element which matches a certain criteria. Right now I'm doing this. MapIntTuple::iterator iter ; for (iter = mymap.begin(); iter != mymap.end(); ++iter) { if (iter->second.get<0>() == current_field) break ; } I'd like to iterate thru the container and find the element whose first string in the tuple matches with my search string. How can i do this using boost::lamdba::bind and std::find_if. May be that will help me in understanding boost::bind better. iter = find_if (mymap.begin(), mymap.end(), ???) ; Thanks in advance, Surya
participants (1)
-
Surya Kiran Gullapalli