|
Boost : |
From: Daryle Walker (dwalker07_at_[hidden])
Date: 2003-06-04 18:28:19
On Tuesday, June 3, 2003, at 9:19 AM, Thomas Witt wrote:
[SNIP]
> To me there are basically two reasons that make newl desirable beside
> the formatting issue.
[SNIP]
> 2. IIUC the difference between a character and a manipulator is that
> the manipulator is not tied to the streams character type. So for some
> applications '\n' does not suffice. To me stream.widen('\n') is
> sufficiently ugly to justify a newl modifier.
Actually, that reason isn't accurate. The '\n' is an expression of
type char, and all output streams can print a char object with operator
<<, even if the stream's character type isn't char. (The stream will
secretly call the widen member function.) Unlike using a manipulator,
printing a character this way also activates all the formatting
considerations.
Daryle
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk