_M_fill initialization in basic_ios::init
Richard Burkert
rrburkert@pobox.com
Fri Dec 7 04:07:00 GMT 2001
Nathan Myers wrote:
>I would not expect constructing a stream to fail, because construction
>is not defined in the standard to depend on any facet members. I would
>expect any formatted i/o operation to fail, though. Crashing is a poor
>way to fail in that case, but probably not explicitly nonconforming.
Right, I didn't expect that I would be able to use formatted i/o,
but I thought I should still be able to construct and use a stream
without any locale facets as long as i stuck to raw input and output
operations. You're right that a streambuf is really all I want then,
thanks for pointing that out, I just had the dumb notion that stream-
bufs were meant to be used just with streams and not independently.
But that aside, when you say construction isnt defined to depend on
any facet members, does that mean it's wrong to depend on one or
just that the standard doesn't say one way or another? Because
practically it does depend on ctype if you need to default the fill
character to widen(' '). I don't have the standard, I don't know
what it says about that.
Thanks,
Rich
More information about the Libstdc++
mailing list