This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
basic_ios::fill() question
- From: Jerry Quinn <jlquinn at us dot ibm dot com>
- To: libstdc++ at gcc dot gnu dot org
- Date: Sun, 02 Nov 2003 02:34:26 -0500
- Subject: basic_ios::fill() question
I was just looking at this lazy eval and wondering about whether it's actually
valid. The spec says the postconditions of basic_ios::init() are that fill()
return widen(' '). But when ctype is not present, is the exception required
to be thrown at the time fill() is called or can it occur as part of init()?
I'm partly thinking that we could set the value during init if a ctype facet
is present, and throw if no ctype exists.
If that doesn't work, can we specialize the basic_ios::fill function for char and
wchar_t, since we know ctype has to exist in this case?
BTW, is it possible to construct a locale with a user-defined facet in place
of ctype<char>? If so, it appears that basic_ios::imbue has a bug since
_M_fill won't be updated to reflect the new value. And _M_fill_init can
already be set, so the fill() code won't do the job. Am I off base here?
Thanks,
Jerry Quinn