$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: [boost] [log] std::endl manipulator does not work, intentional
From: Andreas Huber (ahd6974-spamboostorgtrap_at_[hidden])
Date: 2010-03-22 08:56:26
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.
Thanks,
-- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.