gcc/libstdc++-v3/include
Jonathan Wakely bcd682e1fa PR libstdc++/79980 fix BOM detection, maxcode checks, UCS2 handling
PR libstdc++/79980
	* include/bits/locale_conv.h (__do_str_codecvt): Set __count on
	error path.
	* src/c++11/codecvt.cc (operator&=, operator|=, operator~): Overloads
	for manipulating codecvt_mode values.
	(read_utf16_bom): Compare input to BOM constants instead of integral
	constants that depend on endianness.  Take mode parameter by
	reference and adjust it, to distinguish between no BOM present and
	UTF-16BE BOM present.
	(ucs4_in, ucs2_span, ucs4_span): Adjust calls to read_utf16_bom.
	(surrogates): New enumeration type.
	(utf16_in, utf16_out): Add surrogates parameter to choose between
	UTF-16 and UCS2 behaviour.
	(utf16_span, ucs2_span): Use std::min not std::max.
	(ucs2_out): Use std::min not std::max.  Disallow surrogate pairs.
	(ucs2_in): Likewise. Adjust calls to read_utf16_bom.
	* testsuite/22_locale/codecvt/codecvt_utf16/79980.cc: New test.
	* testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: New test.

From-SVN: r246200
2017-03-16 15:27:51 +00:00
..
backward Update copyright years. 2017-01-01 13:07:43 +01:00
bits PR libstdc++/79980 fix BOM detection, maxcode checks, UCS2 handling 2017-03-16 15:27:51 +00:00
c Update copyright years. 2017-01-01 13:07:43 +01:00
c_compatibility Update copyright years. 2017-01-01 13:07:43 +01:00
c_global Define std::byte for C++17 (P0298R3) 2017-03-09 15:42:02 +00:00
c_std Update copyright years. 2017-01-01 13:07:43 +01:00
debug Update copyright years. 2017-01-01 13:07:43 +01:00
decimal Update copyright years. 2017-01-01 13:07:43 +01:00
experimental Ensure <experimental/iterator> includes <iterator> 2017-02-23 18:25:22 +00:00
ext PR libstdc++/62045 fix O(N) insertion in pd_ds binary heap 2017-03-15 20:11:48 +00:00
parallel Update copyright years. 2017-01-01 13:07:43 +01:00
precompiled Update copyright years. 2017-01-01 13:07:43 +01:00
profile Remove unused include from Profile Mode header 2017-01-13 17:20:23 +00:00
std Implement LWG 2857, {variant,optional,any}::emplace should return the constructed value. 2017-03-16 01:13:20 +02:00
tr1 PR libstdc++/70607 revert recent changes to <tr1/complex> 2017-01-26 19:40:02 +00:00
tr2 Update copyright years. 2017-01-01 13:07:43 +01:00
Makefile.am PR78905 define _GLIBCXX_RELEASE macro 2017-01-19 16:40:46 +00:00
Makefile.in PR78905 define _GLIBCXX_RELEASE macro 2017-01-19 16:40:46 +00:00