gcc/libstdc++-v3/include/std
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
..
algorithm
any
array
atomic Implement P0558R2 changes to std::atomic 2018-05-24 16:28:26 +01:00
bitset
charconv
chrono
codecvt
complex Rollback bad commits! Sorry! 2018-05-07 16:13:48 +00:00
condition_variable
deque
filesystem
forward_list
fstream Add support for opening file streams from wide character strings 2018-05-21 18:18:35 +01:00
functional
future Use std::invoke_result in std::async instead of std::result_of 2018-05-03 13:40:15 +01:00
iomanip
ios
iosfwd
iostream
istream
iterator
limits
list
locale
map
memory
mutex
numeric
optional PR libstdc++/85642 fix is_nothrow_default_constructible<optional<T>> 2018-05-04 09:57:23 +01:00
ostream
queue
random
ratio
regex
scoped_allocator
set
shared_mutex
sstream
stack
stdexcept Some libstdc++ fixes for -Wdeprecated-copy. 2018-05-18 16:02:14 -04:00
streambuf
string
string_view
system_error Some libstdc++ fixes for -Wdeprecated-copy. 2018-05-18 16:02:14 -04:00
thread PR libstdc++/84535 constrain std::thread constructor 2018-05-03 15:08:36 +01:00
tuple
type_traits PR libstdc++/85951 for make_signed/make_unsigned for character types 2018-05-31 13:18:19 +01:00
typeindex
unordered_map
unordered_set
utility
valarray
variant Qualify another call in <variant> 2018-05-29 18:21:31 +01:00
vector