public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r8-10935] libstdc++: Fix inconsistent feature test macro Date: Fri, 30 Apr 2021 22:02:35 +0000 (GMT) [thread overview] Message-ID: <20210430220235.29988386FC30@sourceware.org> (raw) https://gcc.gnu.org/g:d3879001ee42af0f09b5f3b54d8b3d90398532d4 commit r8-10935-gd3879001ee42af0f09b5f3b54d8b3d90398532d4 Author: Jonathan Wakely <jwakely@redhat.com> Date: Fri Apr 30 20:32:05 2021 +0100 libstdc++: Fix inconsistent feature test macro The __cpp_lib_constexpr_string feature test macro is not defined consistently in <version> and <string>. libstdc++-v3/ChangeLog: * include/bits/basic_string.h (__cpp_lib_constexpr_string): Only define for C++17 and later. (cherry picked from commit 3215d4f5b3d08e0087a88df9e155c779927ace1a) Diff: --- libstdc++-v3/include/bits/basic_string.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index 0be11c0c444..5eede562884 100644 --- a/libstdc++-v3/include/bits/basic_string.h +++ b/libstdc++-v3/include/bits/basic_string.h @@ -52,7 +52,10 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION -#define __cpp_lib_constexpr_string 201611L +#if __cplusplus >= 201703L +// Support P0426R1 changes to char_traits in C++17. +# define __cpp_lib_constexpr_string 201611L +#endif #if _GLIBCXX_USE_CXX11_ABI _GLIBCXX_BEGIN_NAMESPACE_CXX11
reply other threads:[~2021-04-30 22:02 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210430220235.29988386FC30@sourceware.org \ --to=redi@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).