* 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.
Tested x86_64-linux (normal and parallel modes), committed to trunk.
commit 37e8a3375e8238a98d2a3624f701f40ea6a8fed3 Author: Jonathan Wakely <jwak...@redhat.com> Date: Tue Oct 1 16:25:07 2019 +0100 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. diff --git a/libstdc++-v3/include/parallel/algo.h b/libstdc++-v3/include/parallel/algo.h index dc6971f5dd4..afa325bb4af 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 6bdf08b4704..c5f85881ace 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 d39fc9abc19..d382a2c92f6 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 a9b8a2b1ea6..a1b1dc7571b 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 66c639ff3a3..cab25498043 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