Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-08-31 16:58:40


Maximilian W. wrote:
> On Tue, 31 Aug 2004 13:55:23 -0700, Delfin Rojas
> <drojas_at_[hidden]> wrote:
>> What errors do you get?
>>
>> -delfin
>
> Whoops! I forgot to paste in the error text.
>
> /users/ugrad/m/mdw45/465/project1/src/project1.cpp:26: error: no match
> for 'operator<<' in 'boost::lambda::operator<<(A&, const
> boost::lambda::lambda_functor<Arg>&) [with A = std::ostream, Arg =
> boost::lambda::placeholder<1>]((+boost::lambda::<unnamed>::_1)) <<
> std::endl '
> */users/user2/ugrad/m/mdw45/lib/format.h:126: error: candidates are:
> std::ostream& operator<<(std::ostream&, const format&)
>
> It says there's no operator for the expression <<(cout, _1).

No, it says there's no operator<< for (cout << _1) and std::endl. std::endl
is an overloaded function and doesn't work with lambda. cout << _1 << '\n'
should work.


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