
10 Jun
2008
10 Jun
'08
3:40 a.m.
Hello, Given a vector of tuples, like this: vector<tuple<int, std::string> > tuples_; I want create a binder to find a tuple by one of its "attributes". If it would be a struct: struct Tuple { int id_; string name_; }; ...I'd use it like this: find_if(tuples_.begin(), tuples_.end(), bind(&Tuple::name_, _1) == "kuku"); How can bind tuples::get<1>() function? Thanks a lot, Igor'.