From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: [patch] libstdc++/65473 Make <ciso646> define libstdc++ version macros.
Date: Thu, 03 Sep 2015 11:05:00 -0000 [thread overview]
Message-ID: <20150903105847.GN2631@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 578 bytes --]
This change would allow including <ciso646> to be used to check for
__GLIBCXX__ and detect whether youre using libstdc++ or not. Howard
Hinnant recommends including that header for libc++ because it has no
other effects in C++.
We could make every <cxxx> header include <bits/c++config.h> so that
any of them can be used, but I can't be bothered doing that change!
This makes it work for the one header that is recommended to be used,
but of course that doesn't help people using older versions of
libstdc++, who still need to include some other header.
Is this worth doing?
[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 2109 bytes --]
commit 0ac33b5beb231efc94ce4f0288fad36047f0325e
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Thu Sep 3 11:45:29 2015 +0100
Make <ciso646> define libstdc++ version macros.
PR libstdc++/65473
* include/c/ciso646: Include <bits/c++config.h> and improve comment.
* include/c_global/ciso646: Likewise.
* include/c_std/ciso646: Likewise.
diff --git a/libstdc++-v3/include/c/ciso646 b/libstdc++-v3/include/c/ciso646
index 125f166..fb537f5 100644
--- a/libstdc++-v3/include/c/ciso646
+++ b/libstdc++-v3/include/c/ciso646
@@ -27,6 +27,6 @@
* in your programs, rather than any of the "*.h" implementation files.
*
* This is the C++ version of the Standard C Library header @c iso646.h,
- * and its contents are (mostly) the same as that header, but are all
- * contained in the namespace @c std.
+ * which is empty in C++.
*/
+#include <bits/c++config.h>
diff --git a/libstdc++-v3/include/c_global/ciso646 b/libstdc++-v3/include/c_global/ciso646
index 818db67..c59677a 100644
--- a/libstdc++-v3/include/c_global/ciso646
+++ b/libstdc++-v3/include/c_global/ciso646
@@ -27,7 +27,6 @@
* in your programs, rather than any of the @a *.h implementation files.
*
* This is the C++ version of the Standard C Library header @c iso646.h,
- * and its contents are (mostly) the same as that header, but are all
- * contained in the namespace @c std (except for names which are defined
- * as macros in C).
+ * which is empty in C++.
*/
+#include <bits/c++config.h>
diff --git a/libstdc++-v3/include/c_std/ciso646 b/libstdc++-v3/include/c_std/ciso646
index 08cdf24..ab44488 100644
--- a/libstdc++-v3/include/c_std/ciso646
+++ b/libstdc++-v3/include/c_std/ciso646
@@ -27,7 +27,6 @@
* in your programs, rather than any of the @a *.h implementation files.
*
* This is the C++ version of the Standard C Library header @c iso646.h,
- * and its contents are (mostly) the same as that header, but are all
- * contained in the namespace @c std (except for names which are defined
- * as macros in C).
+ * which is empty in C++.
*/
+#include <bits/c++config.h>
next reply other threads:[~2015-09-03 10:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-03 11:05 Jonathan Wakely [this message]
2015-09-03 19:32 ` Martin Sebor
2015-09-03 20:40 ` Jonathan Wakely
2015-09-04 9:28 ` Jonathan Wakely
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=20150903105847.GN2631@redhat.com \
--to=jwakely@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@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: link
Be 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).