gcc/libitm
Jonathan Wakely 0191c74141 libstdc++: Simplify constexpr checks in std::char_traits [PR 91488]
This removes the 'static' keyword from the helper functions added by
r8-1294 to detect whether the char_traits member functions can be
evaluated at compile time. This prevents the "inlining failed" error
reported in the PR.

The new testcase from the PR is added to the libitm testsuite, because
that's where we can be sure it's OK to use the -fgnu-tm option.

As a drive-by fix, the feature test macros for C++20 P0980R1 support are
made to depend on whether __cpp_lib_is_constant_evaluated is defined.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>

	PR libstdc++/91488

libstdc++-v3/ChangeLog:

	* include/bits/basic_string.h (__cpp_lib_constexpr_string): Only
	define C++20 value when std::is_constant_evaluated is available.
	* include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
	Likewise.
	(__constant_string_p, __constant_array_p): Give external
	linkage.
	* include/std/version (__cpp_lib_constexpr_char_traits)
	(__cpp_lib_constexpr_string): Only define C++20 values when
	is_constant_evaluated is available.

libitm/ChangeLog:

	* testsuite/libitm.c++/libstdc++-pr91488.C: New test.

(cherry picked from commit b376b1ef38)
2021-06-18 11:16:52 +01:00
..
config Update copyright years. 2021-01-04 10:26:59 +01:00
testsuite libstdc++: Simplify constexpr checks in std::char_traits [PR 91488] 2021-06-18 11:16:52 +01:00
aatree.cc Update copyright years. 2021-01-04 10:26:59 +01:00
aatree.h Update copyright years. 2021-01-04 10:26:59 +01:00
acinclude.m4
aclocal.m4 Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
alloc_c.cc Update copyright years. 2021-01-04 10:26:59 +01:00
alloc_cpp.cc Update copyright years. 2021-01-04 10:26:59 +01:00
alloc.cc Update copyright years. 2021-01-04 10:26:59 +01:00
barrier.cc Update copyright years. 2021-01-04 10:26:59 +01:00
beginend.cc Update copyright years. 2021-01-04 10:26:59 +01:00
ChangeLog Update ChangeLog and version files for release 2021-04-27 09:23:56 +00:00
clone.cc Update copyright years. 2021-01-04 10:26:59 +01:00
common.h Update copyright years. 2021-01-04 10:26:59 +01:00
config.h.in
configure Update GNU/Hurd configure support 2021-01-05 16:04:14 -07:00
configure.ac Update copyright years. 2021-01-04 10:26:59 +01:00
configure.tgt libatomic, libgomp, libitc: Fix bootstrap [PR70454] 2021-01-15 13:16:42 +01:00
containers.h Update copyright years. 2021-01-04 10:26:59 +01:00
dispatch.h Update copyright years. 2021-01-04 10:26:59 +01:00
eh_cpp.cc Update copyright years. 2021-01-04 10:26:59 +01:00
libitm_i.h Update copyright years. 2021-01-04 10:26:59 +01:00
libitm.h Update copyright years. 2021-01-04 10:26:59 +01:00
libitm.map
libitm.spec.in
libitm.texi Update copyright dates. 2021-01-01 17:45:07 +01:00
local_atomic Update copyright years. 2021-01-04 10:26:59 +01:00
local.cc Update copyright years. 2021-01-04 10:26:59 +01:00
Makefile.am
Makefile.in Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
method-gl.cc Update copyright years. 2021-01-04 10:26:59 +01:00
method-ml.cc Update copyright years. 2021-01-04 10:26:59 +01:00
method-serial.cc Update copyright years. 2021-01-04 10:26:59 +01:00
query.cc Update copyright years. 2021-01-04 10:26:59 +01:00
retry.cc Update copyright years. 2021-01-04 10:26:59 +01:00
useraction.cc Update copyright years. 2021-01-04 10:26:59 +01:00
util.cc Update copyright years. 2021-01-04 10:26:59 +01:00