Boost logo

Boost :

Subject: Re: [boost] [log] std::endl manipulator does not work, intentional
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2010-03-22 15:31:15


On 22.03.2010 15:56, Andreas Huber wrote:
> Hi Andrey
>
> On VS2008, this code ...
>
> #include <boost/log/trivial.hpp>
> #include <ostream>
>
> int main()
> {
> BOOST_LOG_TRIVIAL(trace) << "This is a" << std::endl << "multiline
> message";
> return 0;
> }
>
> ... fails compilation with the following error:
>
> error C2679: binary '<<' : no operator found which takes a right-hand
> operand of type 'overloaded-function' (or there is no acceptable
> conversion)
>
> Now I do realize that "\r\n" would be a better choice here, as the
> flushing that comes with std::endl is not necessary. However, some
> developers in our team seem to prefer std::endl nevertheless. So, the
> question is: Is this intentional or just an oversight?
>
> BTW, only std::endl, std::ends and std::flush don't work, all the other
> manipulators do.

It is an oversight. Will fix.


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