codecvt.cc (write_utf16_code_point): Fix code to output surrogate pairs.
authorJonathan Wakely <jwakely@redhat.com>
Wed, 18 Feb 2015 19:39:03 +0000 (19:39 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 18 Feb 2015 19:39:03 +0000 (19:39 +0000)
commit7f971f18e4285157dbf584cf9330716d3ea0fdfc
tree552df56ac69d2714a1f211411ed351a3110a1d4b
parentb0ddb385f0fa0ae6b4b9a360d3dd42060e6b0e63
codecvt.cc (write_utf16_code_point): Fix code to output surrogate pairs.

* src/c++11/codecvt.cc (write_utf16_code_point): Fix code to output
surrogate pairs.
(utf16_in): Pass mode argument to write_utf16_code_point.
(codecvt<char16_t, char, mbstate_t>::do_in): Set mode according to
native byte order.
* testsuite/22_locale/codecvt/char16_t.cc: New.
* testsuite/22_locale/codecvt/in/wchar_t/1.cc: Fix typo.

From-SVN: r220793
libstdc++-v3/ChangeLog
libstdc++-v3/src/c++11/codecvt.cc
libstdc++-v3/testsuite/22_locale/codecvt/char16_t.cc [new file with mode: 0644]
libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/1.cc