This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [PATCH] Fix uses of non-reserved names for template parameters
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Rainer Orth <ro at cebitec dot uni-bielefeld dot de>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Mon, 20 May 2019 13:20:55 +0100
- Subject: Re: [PATCH] Fix uses of non-reserved names for template parameters
- References: <20190517141504.GA29695@redhat.com> <yddo93xnx5f.fsf@CeBiTec.Uni-Bielefeld.DE>
On 20/05/19 14:11 +0200, Rainer Orth wrote:
Hi Jonathan,
* include/bits/random.h (seed_seq::param): Fix non-reserved name.
* include/experimental/type_traits (is_detected_exact)
(is_detected_exact_v): Likewise.
* include/pstl/execution_defs.h (is_execution_policy)
(is_execution_policy_v, __enable_if_execution_policy): Likewise.
* include/pstl/execution_impl.h (__policy_traits): Likewise.
* testsuite/17_intro/names.cc: Check for more non-reserved names.
* testsuite/experimental/names.cc: New test.
Tested powerpc64le-linux, committed to trunk.
the last testcase FAILs on Solaris:
+FAIL: experimental/names.cc (test for excess errors)
Excess errors:
/usr/include/netdb.h:354: error: expected ')' before ';' token
<netdb.h> has
void freeipsecalgent(struct ipsecalgent *ptr);
I'll raise this with Oracle, not sure what to do with the testcase.
We already have similar workarounds for other targets with unclean
headers, so I suggest we just add:
--- a/libstdc++-v3/testsuite/17_intro/names.cc
+++ b/libstdc++-v3/testsuite/17_intro/names.cc
@@ -187,4 +187,8 @@
#undef y
#endif
+#ifdef __sun__
+#undef ptr
+#endif
+
#include <bits/stdc++.h>