gcc/libstdc++-v3/include
Jonathan Wakely 29e4184858 libstdc++: Define type traits for wchar_t even when libc support missing
This meets the requirement that std::is_integral_v<wchar_t> is true,
even when full library support for wchar_t via specializations of
char_traits etc. is not provided. This is done by checking
__WCHAR_TYPE__ to see if the compiler knows about the type, rather than
checking the library's own _GLIBCXX_USE_WCHAR_T autoconf macro.

This assumes that the C++ compiler correctly defines wchar_t as a
distinct type, not a typedef for one of the other integeral types. This
is always true for G++ and should be true for any supported non-GNU
compilers.

Similarly, the std::make_unsigned and std::make_signed traits and the
internal helpers std::__is_integer and std::__is_char are also changed
to depend on the same macro.

libstdc++-v3/ChangeLog:

	* include/std/type_traits (is_integral<wchar_t>)
	(make_unsigned<wchar_t>, make_signed<wchar_t>): Define based
	on #ifdef __WCHAR_TYPE__ instead of _GLIBCXX_USE_WCHAR_T.
	* include/bits/cpp_type_traits.h (__is_integer<wchar_t>)
	(__is_char<wchar_t>): Likewise.
2020-11-01 11:39:07 +00:00
..
backward libstdc++: Add deprecated attributes to old iostream members 2020-08-19 12:13:23 +01:00
bits libstdc++: Define type traits for wchar_t even when libc support missing 2020-11-01 11:39:07 +00:00
c Update copyright years. 2020-01-01 12:51:42 +01:00
c_compatibility Update copyright years. 2020-01-01 12:51:42 +01:00
c_global libstdc++: Add parentheses around assignments used as truth values 2020-09-10 17:09:16 +01:00
c_std Update copyright years. 2020-01-01 12:51:42 +01:00
debug libstdc++: Fix some warnings in headers 2020-10-29 11:43:55 +00:00
decimal Update copyright years. 2020-01-01 12:51:42 +01:00
experimental libstdc++: Fix some warnings in headers 2020-10-29 22:47:22 +00:00
ext libstdc++: Do not use volatile for __gnu_cxx::rope reference counting 2020-10-29 14:47:17 +00:00
parallel libstdc++: Add compile-time checks to__glibcxx_assert [PR 71960] 2020-09-01 20:52:26 +01:00
precompiled libstdc++: Remove unused header 2020-10-19 11:19:28 +01:00
pstl libstdc++: Rebase include/pstl to current upstream 2020-10-21 06:11:28 -07:00
std libstdc++: Define type traits for wchar_t even when libc support missing 2020-11-01 11:39:07 +00:00
tr1 libstdc++: Prevent deprecation warnings from <tr1/shared_ptr> 2020-10-29 22:47:22 +00:00
tr2 Update copyright years. 2020-01-01 12:51:42 +01:00
Makefile.am libstdc++: Reduce header dependencies in and on <memory> 2020-10-22 18:42:03 +01:00
Makefile.in libstdc++: Reduce header dependencies in and on <memory> 2020-10-22 18:42:03 +01:00