|
Boost : |
From: Rozental, Gennadiy (gennadiy.rozental_at_[hidden])
Date: 2003-09-06 03:24:07
> I was surprised (but not too disappointed) to find that:
> int i = 99; // Extend message using operator<<
> BOOST_MESSAGE("BOOST_MESSAGE"<< ", i == " << i << endl);
> fails to compile (MSVC 7.1)
> message is
> error C2679: binary '<<' : no operator found which takes a right-hand
> operand of type 'overloaded-function' (or there is no acceptable
> conversion)
> BOOST_MESSAGE("BOOST_MESSAGE"<< ", i == " << i); // without << endl
> works fine as expected.
> Is this a bug or just a feature worth documenting?
Library add endl itself at the end of log entry. To add an extra empty line
you could use '\n'. I am not sure why endl failing, but it seems pointless
to use it.
Gennadiy.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk