Fix non-reserved names in Parallel Mode headers
authorJonathan Wakely <jwakely@redhat.com>
Tue, 1 Oct 2019 21:02:01 +0000 (22:02 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 1 Oct 2019 21:02:01 +0000 (22:02 +0100)
* include/parallel/algo.h: Replace non-reserved names.
* include/parallel/multiway_merge.h: Likewise.
* include/parallel/multiway_mergesort.h: Likewise.
* include/parallel/numericfwd.h: Likewise.
* testsuite/17_intro/names.cc: Add RAI to test macros.

From-SVN: r276429

libstdc++-v3/ChangeLog
libstdc++-v3/include/parallel/algo.h
libstdc++-v3/include/parallel/multiway_merge.h
libstdc++-v3/include/parallel/multiway_mergesort.h
libstdc++-v3/include/parallel/numericfwd.h
libstdc++-v3/testsuite/17_intro/names.cc

index 7ea135d7842a8657a000e8f94d2c44cb21059483..5b12f564f1b49b8093e21a0f5770aeca435ca6fe 100644 (file)
@@ -1,3 +1,11 @@
+2019-10-01  Jonathan Wakely  <jwakely@redhat.com>
+
+       * include/parallel/algo.h: Replace non-reserved names.
+       * include/parallel/multiway_merge.h: Likewise.
+       * include/parallel/multiway_mergesort.h: Likewise.
+       * include/parallel/numericfwd.h: Likewise.
+       * testsuite/17_intro/names.cc: Add RAI to test macros.
+
 2019-09-30  François Dumont  <fdumont@gcc.gnu.org>
 
        * include/debug/array: Add C++20 constexpr to comparison operators.
index dc6971f5dd42dda31b72e8f173e3addc86d3b9c4..afa325bb4af3d7d1e0398fcac63a058ff71ed44d 100644 (file)
@@ -311,11 +311,11 @@ namespace __parallel
     { return _GLIBCXX_STD_A::unique_copy(__begin, __last, __out, __pred); }
 
   // Parallel unique_copy for random access iterators
-  template<typename _RAIter, typename RandomAccessOutputIterator,
+  template<typename _RAIter, typename _RandomAccessOutputIterator,
           typename _Predicate>
-    RandomAccessOutputIterator
+    _RandomAccessOutputIterator
     __unique_copy_switch(_RAIter __begin, _RAIter __last,
-                        RandomAccessOutputIterator __out, _Predicate __pred,
+                        _RandomAccessOutputIterator __out, _Predicate __pred,
                         random_access_iterator_tag, random_access_iterator_tag)
     {
       if (_GLIBCXX_PARALLEL_CONDITION(
index 6bdf08b4704f63414c72a2ba9a228e6a1f1ca19b..c5f85881aceefb0217bc24bd562141971c030d2b 100644 (file)
@@ -232,7 +232,7 @@ namespace __gnu_parallel
    *
    * @return End iterator of output sequence.
    */
-  template<template<typename RAI, typename C> class iterator,
+  template<template<typename _RAI, typename _C> class iterator,
            typename _RAIterIterator,
            typename _RAIter3,
            typename _DifferenceTp,
@@ -351,7 +351,7 @@ namespace __gnu_parallel
    *
    * @return End iterator of output sequence.
    */
-  template<template<typename RAI, typename C> class iterator,
+  template<template<typename _RAI, typename _C> class iterator,
            typename _RAIterIterator,
            typename _RAIter3,
            typename _DifferenceTp,
@@ -641,8 +641,8 @@ namespace __gnu_parallel
   /** @brief Multi-way merging procedure for a high branching factor,
    *         requiring sentinels to exist.
    *
-   * @tparam UnguardedLoserTree _Loser Tree variant to use for the unguarded
-   *   merging.
+   * @tparam _UnguardedLoserTree Loser Tree variant to use for the unguarded
+   *                            merging.
    *
    * @param __seqs_begin Begin iterator of iterator pair input sequence.
    * @param __seqs_end End iterator of iterator pair input sequence.
@@ -653,7 +653,7 @@ namespace __gnu_parallel
    *
    * @return End iterator of output sequence.
    */
-  template<typename UnguardedLoserTree,
+  template<typename _UnguardedLoserTree,
           typename _RAIterIterator,
           typename _RAIter3,
           typename _DifferenceTp,
@@ -687,7 +687,7 @@ namespace __gnu_parallel
        // non-sentinel elements as we have.
        ++((*__s).second);
 
-      __target_end = multiway_merge_loser_tree_unguarded<UnguardedLoserTree>
+      __target_end = multiway_merge_loser_tree_unguarded<_UnguardedLoserTree>
        (__seqs_begin, __seqs_end, __target, __sentinel, __length, __comp);
 
 #if _GLIBCXX_PARALLEL_ASSERTIONS
index d39fc9abc1929dfb514f39a36b966ca463a23271..d382a2c92f609103f6eaad8b47dcdfc43afe28a0 100644 (file)
@@ -264,19 +264,19 @@ namespace __gnu_parallel
       { __gnu_sequential::sort(__begin, __end, __comp); }
     };
 
-  template<bool __stable, typename Seq_RAIter,
+  template<bool __stable, typename _Seq_RAIter,
           typename _RAIter, typename _Compare,
-          typename DiffType>
+          typename _DiffType>
     struct __possibly_stable_multiway_merge
     { };
 
-  template<typename Seq_RAIter, typename _RAIter,
+  template<typename _Seq_RAIter, typename _RAIter,
           typename _Compare, typename _DiffType>
-    struct __possibly_stable_multiway_merge<true, Seq_RAIter,
+    struct __possibly_stable_multiway_merge<true, _Seq_RAIter,
                                            _RAIter, _Compare, _DiffType>
     {
-      void operator()(const Seq_RAIter& __seqs_begin,
-                     const Seq_RAIter& __seqs_end,
+      void operator()(const _Seq_RAIter& __seqs_begin,
+                     const _Seq_RAIter& __seqs_end,
                      const _RAIter& __target,
                      _Compare& __comp,
                      _DiffType __length_am) const
@@ -284,13 +284,13 @@ namespace __gnu_parallel
                              __length_am, __comp, sequential_tag()); }
     };
 
-  template<typename Seq_RAIter, typename _RAIter,
+  template<typename _Seq_RAIter, typename _RAIter,
           typename _Compare, typename _DiffType>
-    struct __possibly_stable_multiway_merge<false, Seq_RAIter,
+    struct __possibly_stable_multiway_merge<false, _Seq_RAIter,
                                            _RAIter, _Compare, _DiffType>
     {
-      void operator()(const Seq_RAIter& __seqs_begin,
-                      const Seq_RAIter& __seqs_end,
+      void operator()(const _Seq_RAIter& __seqs_begin,
+                      const _Seq_RAIter& __seqs_end,
                       const _RAIter& __target,
                       _Compare& __comp,
                       _DiffType __length_am) const
index a9b8a2b1ea6eb54f2640d93ce7f1e0b74104ba4f..a1b1dc7571b5a83409247a1e5f7e5572dcfac695 100644 (file)
@@ -149,17 +149,17 @@ namespace __parallel
                   _BinaryFunction2, __gnu_parallel::sequential_tag);
 
   template<typename _IIter1, typename _IIter2, typename _Tp,
-           typename BinaryFunction1, typename BinaryFunction2>
+           typename _BinaryFunction1, typename _BinaryFunction2>
     _Tp
-    inner_product(_IIter1, _IIter1, _IIter2, _Tp, BinaryFunction1,
-                  BinaryFunction2, __gnu_parallel::_Parallelism);
+    inner_product(_IIter1, _IIter1, _IIter2, _Tp, _BinaryFunction1,
+                  _BinaryFunction2, __gnu_parallel::_Parallelism);
 
   template<typename _RAIter1, typename _RAIter2, typename _Tp,
-           typename BinaryFunction1, typename BinaryFunction2>
+           typename _BinaryFunction1, typename _BinaryFunction2>
     _Tp
-    __inner_product_switch(_RAIter1, _RAIter1, _RAIter2, _Tp, BinaryFunction1,
-                         BinaryFunction2, random_access_iterator_tag, 
-                         random_access_iterator_tag, 
+    __inner_product_switch(_RAIter1, _RAIter1, _RAIter2, _Tp, _BinaryFunction1,
+                         _BinaryFunction2, random_access_iterator_tag,
+                         random_access_iterator_tag,
                          __gnu_parallel::_Parallelism
                          = __gnu_parallel::parallel_unbalanced);
 
index 66c639ff3a33e1ff71ee7c892addb470379884ce..cab2549804300b66902a3eaf7755656db593342c 100644 (file)
 #define BidirectionalIterator  BidirectionalIterator is not a reserved name
 #define RandomAccessIterator   RandomAccessIterator is not a reserved name
 #define RandomAccessOutputIterator     RandomAccessOutputIterator is not a reserved name
+#define RAI                    RAI is not a reserved name
 #define RAIter                 RAIter is not a reserved name
 #define FwdIter                        FwdIter is not a reserved name
 #define OutIter                        OutIter is not a reserved name