5 May
2008
5 May
'08
12:19 p.m.
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