|
Boost Users : |
From: Christian Rössel (christian.roessel_at_[hidden])
Date: 2006-07-13 09:23:11
Hello,
assume I want to do a std::find_if on a container of A* with
struct A
{
int foo;
};
Now I have two ways of writing the predicate for find_if:
1. find_if (cont.begin (), cont.end (), _1 ->* &A::foo == 42);
2. find_if (cont.begin (), cont.end (), bind (&A::foo, _1) == 42);
They both perform as expected. Are there any differences that make
one of them preferrable?
Thanks,
Christian
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