Boost logo

Boost :

From: Rafal Dabrowa (rdabrowa_at_[hidden])
Date: 2005-06-06 12:32:11


Suppose I have the following structure:

   struct xy { int x, y; };

and the following vector:

   vector<xy> v(10);

I want to use lambda library for find an item in the table.
Let's say, with x member value equal to 10.
Something like this doesn't work:

   pos = find_if(v.begin(), v.end(), _1.x == 10);

How the above line should be written ?

Rafal


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk