|
Boost Users : |
From: Ken Yarnall (yg-boost-users_at_[hidden])
Date: 2002-09-12 22:40:59
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 <boost/lambda/lambda.hpp>
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_functor<boost::lambda::lambda_functor_base<boost::lambda::
bitwise_action<boost::lambda::leftshift_action>,
boost::tuples::tuple<std::ostream&,
boost::lambda::lambda_functor<boost::lambda::placeholder<1> >,
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
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net