Boost logo

Boost :

From: Dave Abrahams (abrahams_at_[hidden])
Date: 2000-03-06 18:08:46


on 3/6/00 3:33 PM, Dave Steffen at steffend_at_[hidden] wrote:

>> I ignore std::endl except on the extremely rare occasions where I
>> actually want "<< '\n' << std::flush".

s << std::endl is actually equivalent to s.put(s.widen('\n'), s.flush

Does a wide stream automatically properly widen chars which are streamed in?
27.6.2.5.4 seems to say that it does.

> Presuming everyone's read Scott Meyer's take on the endl thing
> (<http://www.aristeia.com/Papers/C++ReportColumns/novdec95.pdf>), I
> have several questions for the Boost group:
>
> A) do you think he's right,

Only if auto-widening is properly implemented (which it appears to be)

> B) _if_ he's right, what should we do about it?

Not much to do. We can use '\n' explicitly, it seems, so my complaint with
endl is probably moot.

-Dave


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