This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFC] libstdc++/37475
- From: Martin Sebor <sebor at roguewave dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Thu, 11 Sep 2008 09:42:32 -0600
- Subject: Re: [RFC] libstdc++/37475
- References: <48C8F0CF.2000504@oracle.com>
FWIW, this sounds close to issue 382:
http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#382
I'm not sure it matters whether the functions return ok
or partial. Our filebuf handles both cases exactly the
same.
Martin
Paolo Carlini wrote:
Hi all, hi Bo,
I'd like to ask the opinion of list - Bo in particular, our std::codecvt
expert - about this PR, which is about a codecvt::do_in / do _out corner
case: when the functions are called with from_end > from but to_end ==
to, thus no space at all provided to store the conversion. Currently we
return "ok" in this case (we do nothing, just skip completely the
conversion loop), where submitter expects "partial" because of Table 53
of the Standard which describes "partial - not all source characters
converted".
Frankly, I don't have a strong opinion, the current behavior rather
makes sense to me because in this specific case *no conversion is
attempted at all", but I know there are quite a few tricky issues having
to do with codecvt and our current implementation is a delicate balance,
result of our interpretation of a few DRs and the constraints due to the
underlying use of C library functions...
Opinions?
Thanks,
Paolo.