This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++11, C++14 PATCH 3/3] Support for SD-6: SG10 Feature Test Recommendations - libstdc++
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Ed Smith-Rowland <3dw4rd at verizon dot net>
- Cc: "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 1 Jun 2014 16:56:26 +0100
- Subject: Re: [C++11, C++14 PATCH 3/3] Support for SD-6: SG10 Feature Test Recommendations - libstdc++
- Authentication-results: sourceware.org; auth=none
- References: <5389CF71 dot 8070208 at verizon dot net>
On 31/05/14 08:47 -0400, Ed Smith-Rowland wrote:
This is the libstdc++ and libstdc++ testsuite part.
Apologies for not sending this to libstdc++.
This time you didn't CC gcc-patches.
All libstdc++ patches need to go to gcc-patches and libstdc++, it's
not complicated :-)
Index: include/std/mutex
===================================================================
--- include/std/mutex (revision 211078)
+++ include/std/mutex (working copy)
@@ -35,6 +35,9 @@
# include <bits/c++0x_warning.h>
#else
+// For backwards compatibility of SD-6.
This comment could be more accurate, doesn't the current version of
SD-6 specify exactly this? So it would be more accurate say it's for
conformance (not backwards compatibility), but note that it's also
defined in <shared_mutex> because that's more useful. A note in
<shared_mutex> would make sense too.
+#define __cpp_lib_shared_mutex 201304
+
#include <tuple>
#include <chrono>
#include <exception>
Index: include/std/shared_mutex
===================================================================
--- include/std/shared_mutex (revision 211078)
+++ include/std/shared_mutex (working copy)
@@ -52,6 +52,9 @@
*/
#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
+
+#define __cpp_lib_shared_mutex 201402
As Marc noted for the constexpr macro, this is defined twice. Please
only do so conditionally, or use #undef first.