]> gcc.gnu.org Git - gcc.git/commit
libstdc++: Simplify constexpr checks in std::char_traits [PR 91488]
authorJonathan Wakely <jwakely@redhat.com>
Thu, 17 Jun 2021 13:11:22 +0000 (14:11 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 18 Jun 2021 11:58:40 +0000 (12:58 +0100)
commitcc44169fc7bc7552eb85f143f4fee9c8bcdd5e49
tree9824a7d1d98b342833747fcf6b317165ed2658cb
parent3f023bc5bb3d260ffe7d6e1f333fb41bbbbae444
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.

Signed-off-by: Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/91488

libstdc++-v3/ChangeLog:

* include/bits/char_traits.h (__constant_string_p)
(__constant_array_p): Give external linkage.

libitm/ChangeLog:

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

(cherry picked from commit b376b1ef38971b84975ad1540bf5d2ae0b924e76)
libitm/testsuite/libitm.c++/libstdc++-pr91488.C [new file with mode: 0644]
libstdc++-v3/include/bits/char_traits.h
This page took 0.060099 seconds and 6 git commands to generate.