gcc/libstdc++-v3
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
..
config libstdc++: Fix linker script to remove conflicting patterns 2020-10-29 22:47:22 +00:00
doc
include libstdc++: Define type traits for wchar_t even when libc support missing 2020-11-01 11:39:07 +00:00
libsupc++ libstdc++: Add comment to nothrow new explaining catch (...) 2020-10-28 13:19:21 +00:00
po
python
scripts
src libstdc++: Fix gnu-version-namespace buid 2020-10-31 18:10:10 +01:00
testsuite libstdc++: Prefer double to long double in std::shuffle_order_engine 2020-10-31 12:54:03 +00:00
acinclude.m4 libstdc++: Implement C++20 features for <sstream> 2020-10-28 11:56:06 -07:00
aclocal.m4
ChangeLog Daily bump. 2020-10-30 00:16:29 +00: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
ChangeLog-2018
ChangeLog-2019
config.h.in
configure libstdc++: Implement C++20 features for <sstream> 2020-10-28 11:56:06 -07:00
configure.ac
configure.host Scope libstdc++ configuration for vxworks to all versions 2020-10-22 16:40:57 +00:00
crossconfig.m4 Scope libstdc++ configuration for vxworks to all versions 2020-10-22 16:40:57 +00: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.