aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2019-10-01 22:02:01 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2019-10-01 22:02:01 +0100
commit577663511e00773f0d4ac2da00d1add7f4529d18 (patch)
treef125febfcea43ac712a82eebb81755f3ca6ec711
parent43a0ea77858cdf81ca34145a4572e1c0e8e3d1e3 (diff)
downloadgcc-577663511e00773f0d4ac2da00d1add7f4529d18.zip
gcc-577663511e00773f0d4ac2da00d1add7f4529d18.tar.gz
gcc-577663511e00773f0d4ac2da00d1add7f4529d18.tar.bz2
Fix non-reserved names in Parallel Mode headers
* 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
-rw-r--r--libstdc++-v3/ChangeLog8
-rw-r--r--libstdc++-v3/include/parallel/algo.h6
-rw-r--r--libstdc++-v3/include/parallel/multiway_merge.h12
-rw-r--r--libstdc++-v3/include/parallel/multiway_mergesort.h20
-rw-r--r--libstdc++-v3/include/parallel/numericfwd.h14
-rw-r--r--libstdc++-v3/testsuite/17_intro/names.cc1
6 files changed, 35 insertions, 26 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 7ea135d..5b12f56 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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.
diff --git a/libstdc++-v3/include/parallel/algo.h b/libstdc++-v3/include/parallel/algo.h
index dc6971f..afa325b 100644
--- a/libstdc++-v3/include/parallel/algo.h
+++ b/libstdc++-v3/include/parallel/algo.h
@@ -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(
diff --git a/libstdc++-v3/include/parallel/multiway_merge.h b/libstdc++-v3/include/parallel/multiway_merge.h
index 6bdf08b..c5f8588 100644
--- a/libstdc++-v3/include/parallel/multiway_merge.h
+++ b/libstdc++-v3/include/parallel/multiway_merge.h
@@ -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
diff --git a/libstdc++-v3/include/parallel/multiway_mergesort.h b/libstdc++-v3/include/parallel/multiway_mergesort.h
index d39fc9a..d382a2c 100644
--- a/libstdc++-v3/include/parallel/multiway_mergesort.h
+++ b/libstdc++-v3/include/parallel/multiway_mergesort.h
@@ -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
diff --git a/libstdc++-v3/include/parallel/numericfwd.h b/libstdc++-v3/include/parallel/numericfwd.h
index a9b8a2b..a1b1dc7 100644
--- a/libstdc++-v3/include/parallel/numericfwd.h
+++ b/libstdc++-v3/include/parallel/numericfwd.h
@@ -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);
diff --git a/libstdc++-v3/testsuite/17_intro/names.cc b/libstdc++-v3/testsuite/17_intro/names.cc
index 66c639f..cab2549 100644
--- a/libstdc++-v3/testsuite/17_intro/names.cc
+++ b/libstdc++-v3/testsuite/17_intro/names.cc
@@ -113,6 +113,7 @@
#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