re PR libstdc++/19955 (Second std::ctype<char>::narrow() does not call std::ctype...
authorPaolo Carlini <pcarlini@suse.de>
Tue, 15 Feb 2005 23:29:52 +0000 (23:29 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 15 Feb 2005 23:29:52 +0000 (23:29 +0000)
commit82ce2a94d9c0782c0e88fabe924e90a050f56ac8
tree36ecbbfafa6758d85faee24364c6147bffcc899a
parentfd9850d552e8140111aed9c1aaa7c14d4fcb443b
re PR libstdc++/19955 (Second std::ctype<char>::narrow() does not call std::ctype<char>::do_narrow())

2005-02-15  Paolo Carlini  <pcarlini@suse.de>
    Jon Grimm  <jgrimm2@us.ibm.com>

PR libstdc++/19955
* include/bits/locale_facets.h (ctype<char>::_M_narrow_init()):
Fix the logic setting _M_narrow_ok: first check whether the
transformation is trivial with a dflt == 0, then deal with the
special case of zero.
* testsuite/22_locale/ctype/narrow/char/19955.cc: New.

* include/bits/locale_facets.h (ctype<char>::_M_widen_init()):
Tweak consistently to use memcmp; minor formatting fixes.

Co-Authored-By: Jon Grimm <jgrimm2@us.ibm.com>
From-SVN: r95082
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/locale_facets.h
libstdc++-v3/testsuite/22_locale/ctype/narrow/char/19955.cc [new file with mode: 0644]