gcc/libstdc++-v3
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
..
config Add support for opening file streams from wide character strings 2018-05-21 18:18:35 +01:00
doc Document Dual ABI for std::ios_base::failure 2018-05-10 20:13:42 +01:00
include PR libstdc++/85951 for make_signed/make_unsigned for character types 2018-05-31 13:18:19 +01:00
libsupc++ Some libstdc++ fixes for -Wdeprecated-copy. 2018-05-18 16:02:14 -04:00
po
python printers.py (build_libstdcxx_dictionary): Fix std::_Fwd_list_iterator and std::_Fwd_list_const_iterator printers registration. 2018-03-09 05:56:07 +00:00
scripts
src re PR libstdc++/85768 (FreeBSD bootstrap fails due to undefined reference to 'backtrace') 2018-05-25 16:40:55 +00:00
testsuite PR libstdc++/85951 for make_signed/make_unsigned for character types 2018-05-31 13:18:19 +01:00
acinclude.m4 PR libstdc++/84654 Disable __float128 specializations for -mno-float128 2018-05-01 23:47:33 +01:00
aclocal.m4
ChangeLog PR libstdc++/85951 for make_signed/make_unsigned for character types 2018-05-31 13:18:19 +01:00
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017
config.h.in Add support for opening file streams from wide character strings 2018-05-21 18:18:35 +01:00
configure PR target/85904 check for aligned_alloc on netbsd cross-compilation 2018-05-24 18:31:13 +01:00
configure.ac Add support for opening file streams from wide character strings 2018-05-21 18:18:35 +01:00
configure.host
crossconfig.m4 PR target/85904 check for aligned_alloc on netbsd cross-compilation 2018-05-24 18:31:13 +01:00
fragment.am
linkage.m4
Makefile.am
Makefile.in
README

file: libstdc++-v3/README

New users may wish to point their web browsers to the file
index.html in the 'doc/html' subdirectory.  It contains brief
building instructions and notes on how to configure the library in
interesting ways.