This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFC] err |= ios_base::failbit or err = ios_base::failbit?!?
Nathan Myers wrote:
...
It probably would be better actually to assign failbit, rather than
ORing it in.
Perhaps. It certainly is what 22.2, p2 says, but it is contrary
to what the individual clauses for num_get and money_get specify.
There is no text specifying what time_get does with the iostate
argument, so it presumably defaults to 22.2, p2, creating an
inconsistency between how the facets report errors to callers.
We should check that the istream extractor code does
the Right Thing with error results from facet calls, and does not
(e.g.) just pass the basic_ios member directly as the err argument.
You're probably thinking of passing *this as the ios_base asrgument
(there is no conversion from ios_base to iostate).
Martin