
13 Jul
2006
13 Jul
'06
1:23 p.m.
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
6799
Age (days ago)
6799
Last active (days ago)
0 comments
1 participants
participants (1)
-
Christian Rössel