From: Igor R (boost.lists_at_[hidden])
Date: 2008-06-10 05:40:30


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'.