|
Boost Users : |
From: Kevin Martin (kev82_at_[hidden])
Date: 2008-05-05 08:19:10
I am trying to replicate the function object:
struct find_with_n_set
{
int n;
find_with_n_set(int n) : n(n) {}
bool operator()(const shared_ptr<Object> &ptr) {
return ptr && ptr->GetBitset().test(n);
}
};
I think I have done it with the expression:
_1 && bind(&dynamic_bitset<>::test, bind(&Object::GetBitset, *_1), n)
It seems to work, so I'm guessing it is correct. Is there a better way
to write it though, because it seems rather difficult to read.
Thanks,
Kevin Martin
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net