gcc/libstdc++-v3/testsuite/22_locale/codecvt
Jonathan Wakely d951e75dfe Fix alignment bugs in std::codecvt_utf16
* src/c++11/codecvt.cc (range): Add non-type template parameter and
	define oerloaded operators for reading and writing code units.
	(range<Elem, false>): Define partial specialization for accessing
	wide characters in potentially unaligned byte ranges.
	(ucs2_span(const char16_t*, const char16_t*, ...))
	(ucs4_span(const char16_t*, const char16_t*, ...)): Change parameters
	to range<const char16_t, false> in order to avoid unaligned reads.
	(__codecvt_utf16_base<char16_t>::do_out)
	(__codecvt_utf16_base<char32_t>::do_out)
	(__codecvt_utf16_base<wchar_t>::do_out): Use range specialization for
	unaligned data to avoid unaligned writes.
	(__codecvt_utf16_base<char16_t>::do_in)
	(__codecvt_utf16_base<char32_t>::do_in)
	(__codecvt_utf16_base<wchar_t>::do_in): Likewise for writes. Return
	error if there are unprocessable trailing bytes.
	(__codecvt_utf16_base<char16_t>::do_length)
	(__codecvt_utf16_base<char32_t>::do_length)
	(__codecvt_utf16_base<wchar_t>::do_length): Pass arguments of type
	range<const char16_t, false> to span functions.
	* testsuite/22_locale/codecvt/codecvt_utf16/misaligned.cc: New test.

From-SVN: r246245
2017-03-17 19:28:05 +00:00
..
always_noconv Update copyright years. 2017-01-01 13:07:43 +01:00
codecvt_utf8 Fix encoding() and max_length() values for codecvt facets 2017-03-16 15:27:57 +00:00
codecvt_utf8_utf16 Fix encoding() and max_length() values for codecvt facets 2017-03-16 15:27:57 +00:00
codecvt_utf16 Fix alignment bugs in std::codecvt_utf16 2017-03-17 19:28:05 +00:00
encoding Update copyright years. 2017-01-01 13:07:43 +01:00
in Update copyright years. 2017-01-01 13:07:43 +01:00
length Update copyright years. 2017-01-01 13:07:43 +01:00
max_length Update copyright years. 2017-01-01 13:07:43 +01:00
out Update copyright years. 2017-01-01 13:07:43 +01:00
requirements Update copyright years. 2017-01-01 13:07:43 +01:00
unshift Update copyright years. 2017-01-01 13:07:43 +01:00
char16_t.cc Fix encoding() and max_length() values for codecvt facets 2017-03-16 15:27:57 +00:00
char32_t.cc Update copyright years. 2017-01-01 13:07:43 +01:00
utf8.cc Update copyright years. 2017-01-01 13:07:43 +01:00