Meryl Silverburgh wrote:
I have a map with key is a pair: typedef map < pair
, string> pairMapString; pair
key(1,3); map[key] = "one"; How can I create a binary function using boost lamba which check the first value of the pair of the key of the map?
void add(pairMapString;& myMap, int x) {
iterator& itr = find_if(myMap.begin(), myMap.end(), bind(equal_to < int >(), bind(&BlockDataPairMap::value_type::first::value_type::first, _1 ) , x) );
using namespace std;
using namespace boost::lambda;
typedef pair