public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r9-8980] libstdc++: Fix non-reserved name in header
@ 2020-10-08  0:36 Jonathan Wakely
  0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2020-10-08  0:36 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:4c591af5947efd6686c627de787d3e97c32a191f

commit r9-8980-g4c591af5947efd6686c627de787d3e97c32a191f
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Oct 8 00:05:53 2020 +0100

    libstdc++: Fix non-reserved name in header
    
    There's a "il" parameter in a std::seed_seq constructor in <random>
    which is only reserved since C++14.
    
    libstdc++-v3/ChangeLog:
    
            * include/bits/random.h (seed_seq(initializer_list<T>)): Rename
            parameter to use reserved name.
            * testsuite/17_intro/names.cc: Check "il".
    
    (cherry picked from commit 23f75da95f5e8e09e9fcbd5b0d2885e6c44739aa)

Diff:
---
 libstdc++-v3/include/bits/random.h       | 2 +-
 libstdc++-v3/testsuite/17_intro/names.cc | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/include/bits/random.h b/libstdc++-v3/include/bits/random.h
index 14f680f50c4..889b05ac5a9 100644
--- a/libstdc++-v3/include/bits/random.h
+++ b/libstdc++-v3/include/bits/random.h
@@ -6066,7 +6066,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     { }
 
     template<typename _IntType>
-      seed_seq(std::initializer_list<_IntType> il);
+      seed_seq(std::initializer_list<_IntType> __il);
 
     template<typename _InputIterator>
       seed_seq(_InputIterator __begin, _InputIterator __end);
diff --git a/libstdc++-v3/testsuite/17_intro/names.cc b/libstdc++-v3/testsuite/17_intro/names.cc
index a47d53503e3..efb0bd137a7 100644
--- a/libstdc++-v3/testsuite/17_intro/names.cc
+++ b/libstdc++-v3/testsuite/17_intro/names.cc
@@ -104,6 +104,11 @@
 #define uses_allocator  (
 #endif
 
+#if __cplusplus < 201402L
+// <complex> defines operator""il
+#define il  (
+#endif
+
 #if __cplusplus < 201703L
 // <charconv> defines to_chars_result::ptr and to_chars_result::ec
 #define ec (


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-08  0:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-08  0:36 [gcc r9-8980] libstdc++: Fix non-reserved name in header Jonathan Wakely

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).