Hi there.
I have a recent CVS version of Boost installed, and am using g++ v3.2. I
tried to compile the following program:
-----------lambda_test.cpp------------
#include <iostream>
#include <string>
#include <list>
#include <algorithm>
#include
using namespace std;
using namespace boost::lambda;
int main()
{
list<int> ell;
for (int i=0; i<100; ++i)
ell.push_back(4*i-1);
for_each(ell.begin(), ell.end(), cout << _1 << endl);
}
--------------------------------------
I am met by:
% g++ -I/usr/local/boost -c lambda_test.cpp
lambda_test.cpp: In function `int main()':
lambda_test.cpp:17: no match for `const
boost::lambda::lambda_functorboost::lambda::leftshift_action,
boost::tuples::tuple >,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type> > > << <unknown type>'
operator
Any suggestions? I am aware that I can replace endl by '\n' and get a
compilable program. I worry that this problem extends to other
manipulators...
Thanks,
Ken