I\'d like to use std::find_if to search for the first element in my map that has a certain value in a specific element of its value structure. I\'m a little confus
std::find_if
using Boost.Bind and Boost.Lambda:
... #include #include ... typedef std::map MapType; ... MapType::iterator pos = std::find_if(myMap.begin(), myMap.end(), boost::bind(&ValueType::y, boost::bind(&MapType::iterator::value_type::second, _1)) == magic_number);