Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-08-27 07:43:37


zaufi wrote:
> Hi, everybody!
>
> We've got a problem with a following code that does not compile:
>
> #include <list>
> #include <algorithm>
> #include <boost/lambda/bind.hpp>
>
> int main()
> {
> using namespace boost::lambda;
>
>
> std::list<std::list<int> > l;
> bool some_are_empty = false;
>
> std::for_each(l.begin(), l.end(), var(some_are_empty) =
> bind(&std::list<int>::empty, _1) || some_are_empty);
>
> return 0;
> }

You forgot to include <boost/lambda/lambda.hpp>, where operator|| is
defined.


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