#include #include #include #include #include using namespace boost::phoenix; using namespace boost::phoenix::arg_names; using namespace std; struct simple { simple(const int value): value_(value) {} int value_; }; int main() { int init[] = { 2, 10, 4, 5, 1, 6, 8, 3, 9, 7 }; vector c(init, init + 10); typedef vector::iterator iterator; // Find the first odd number in container c iterator it = find_if(c.begin(), c.end(), arg1->value % 2 == 1); if (it != c.end()) cout << *it << endl; // if found, print the result return 0; }