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 r10-9044] libstdc++: Fix unconditional definition of __cpp_lib_span in <version> [PR 97869} Date: Wed, 18 Nov 2020 13:03:46 +0000 (GMT) [thread overview] Message-ID: <20201118130346.18798385800A@sourceware.org> (raw) https://gcc.gnu.org/g:992643655c872f8332f9e8e453631a8fad52943a commit r10-9044-g992643655c872f8332f9e8e453631a8fad52943a Author: Jonathan Wakely <jwakely@redhat.com> Date: Tue Nov 17 15:26:29 2020 +0000 libstdc++: Fix unconditional definition of __cpp_lib_span in <version> [PR 97869} The <span> header is empty unless Concepts are supported, but <version> defines the __cpp_lib_span feature test macro unconditionally. It should be guarded by the same conditions as in <span>. libstdc++-v3/ChangeLog: PR libstdc++/97869 * include/precompiled/stdc++.h: Include <coroutine>. * include/std/version (__cpp_lib_span): Check __cpp_lib_concepts before defining. (cherry picked from commit ecf65330c11544ebf35e198087b4a42be089c620) Diff: --- libstdc++-v3/include/precompiled/stdc++.h | 3 +++ libstdc++-v3/include/std/version | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/include/precompiled/stdc++.h b/libstdc++-v3/include/precompiled/stdc++.h index 7518a98c25a..5b8f6340448 100644 --- a/libstdc++-v3/include/precompiled/stdc++.h +++ b/libstdc++-v3/include/precompiled/stdc++.h @@ -137,6 +137,9 @@ #include <bit> #include <compare> #include <concepts> +#if __cpp_impl_coroutine +# include <coroutine> +#endif #include <numbers> #include <ranges> #include <span> diff --git a/libstdc++-v3/include/std/version b/libstdc++-v3/include/std/version index c3a5bd26e63..e899a1e6d99 100644 --- a/libstdc++-v3/include/std/version +++ b/libstdc++-v3/include/std/version @@ -218,7 +218,9 @@ # define __cpp_lib_ranges 201911L #endif #define __cpp_lib_shift 201806L -#define __cpp_lib_span 202002L +#if __cpp_lib_concepts +# define __cpp_lib_span 202002L +#endif #define __cpp_lib_ssize 201902L #define __cpp_lib_starts_ends_with 201711L #define __cpp_lib_to_address 201711L
reply other threads:[~2020-11-18 13:03 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=20201118130346.18798385800A@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).