#include <iostream> #include <algorithm> #include <functional> #include <boost/lambda/lambda.hpp> using namespace std; using namespace boost::lambda; int main(int, char* []) { const int a[] = { 111, 222, 100, 99, 101 }; const int size = sizeof(a) / sizeof(*a); const int* p1 = find_if(a, a + size, bind2nd(less<int>(), 100)); cout << *p1 << endl; const int* p2 = find_if(a, a + size, bind1st(not2(less<int>()), 100)); cout << *p2 << endl; const int* p3 = find_if(a, a + size, _1 < 100); cout << *p3 << endl; const int* p4 = find_if(a, a + size, _1 <= 100); cout << *p4 << endl; return 0; }