OSDN Git Service

2003-11-18 Paolo Carlini <pcarlini@suse.de>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 18 Nov 2003 08:21:38 +0000 (08:21 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 18 Nov 2003 08:21:38 +0000 (08:21 +0000)
commit82324c1058d49eba1a2fa88db013c46f0a1b55c3
treedaa2ff7e839fcb7ddd139eef47a4d6daedfcfab6
parentace90aef2f1ae32d158f6b60690e3aaf47e95eca
2003-11-18  Paolo Carlini  <pcarlini@suse.de>

PR libstdc++/12868
* include/bits/fstream.tcc (imbue): For encodings != -1 it's
always ok to imbue a new locale, provided seekoff(0, cur, ...)
doesn't fail, of course.
(underflow): In order for the above to work, deal gracefully
with _M_codecvt->in returning codecvt_base::error while
(__ilen = __iend - this->eback()) > 0: it just means __ilen
correctly converted internal characters before an error.
* testsuite/27_io/basic_filebuf/imbue/wchar_t/12868.cc: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73697 138bc75d-0d04-0410-961f-82ee72b054a4
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/fstream.tcc
libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/12868.cc [new file with mode: 0644]