gcc/libstdc++-v3/include
Jonathan Wakely 22f1f4c790 PR libstdc++/85951 for make_signed/make_unsigned for character types
Because the wide character types are neither signed integer types nor
unsigned integer types they need to be transformed to an integral type
of the correct size and the lowest rank (which is not necessarily the
underlying type). Reuse the helpers for enumeration types to select the
correct integer.

The refactoring of __make_unsigned_selector and __make_signed_selector
slightly reduces the number of template instantiations and so reduces
memory usage.

	PR libstdc++/85951
	* include/std/type_traits [_GLIBCXX_USE_C99_STDINT_TR1]: Do not define
	uint_least16_t and uint_least32_t.
	(__make_unsigned<wchar_t>): Define unconditionally.
	(__make_unsigned_selector<_Tp, true, false>): Remove intermediate
	typedefs.
	(__make_unsigned_selector_base): New type to provide helper templates.
	(__make_unsigned_selector<_Tp, false, true>): Reimplement using
	__make_unsigned_selector_base helpers.
	(__make_unsigned<char16_t>, __make_unsigned<char32_t>): Define.
	(__make_signed_selector<_Tp, true, false>): Remove intermediate
	typedefs.
	(__make_signed<wchar_t>, __make_signed<char16_t>)
	(__make_signed<char32_t>)): Define unconditionally.
	* testsuite/20_util/make_signed/requirements/typedefs-3.cc: Check
	wchar_t, char16_t and char32_t are transformed correctly.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust
	dg-error lineno.
	* testsuite/20_util/make_unsigned/requirements/typedefs-3.cc: Check
	wchar_t, char16_t and char32_t are transformed correctly.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust
	dg-error lineno.

From-SVN: r261023
2018-05-31 13:18:19 +01:00
..
backward PR libstdc++/69608 Move semantics for strstreambuf 2018-05-02 17:25:44 +01:00
bits stl_tree.h (_Rb_tree_impl(_Node_allocator&&)): New. 2018-05-27 17:06:40 +00:00
c Update copyright years. 2018-01-03 11:03:58 +01:00
c_compatibility Update copyright years. 2018-01-03 11:03:58 +01:00
c_global PR libstdc++/85729 add linkage specifications to headers 2018-05-10 13:35:45 +01:00
c_std Update copyright years. 2018-01-03 11:03:58 +01:00
debug 2018-05-18 François Dumont <fdumont@gcc.gnu.org> 2018-05-18 20:49:49 +00:00
decimal Update copyright years. 2018-01-03 11:03:58 +01:00
experimental Refactor path construction from null terminated iterator ranges 2018-05-23 23:48:51 +01:00
ext Some libstdc++ fixes for -Wdeprecated-copy. 2018-05-18 16:02:14 -04:00
parallel Update copyright years. 2018-01-03 11:03:58 +01:00
precompiled Update copyright years. 2018-01-03 11:03:58 +01:00
profile Update copyright years. 2018-01-03 11:03:58 +01:00
std PR libstdc++/85951 for make_signed/make_unsigned for character types 2018-05-31 13:18:19 +01:00
tr1 PR libstdc++/83140 - assoc_legendre returns negated value when m is odd 2018-05-10 13:59:52 +00:00
tr2 Update copyright years. 2018-01-03 11:03:58 +01:00
Makefile.am PR libstdc++/85672 #undef _GLIBCXX_USE_FLOAT128 when not supported 2018-05-08 14:05:04 +01:00
Makefile.in PR libstdc++/85672 #undef _GLIBCXX_USE_FLOAT128 when not supported 2018-05-08 14:05:04 +01:00