[PATCH] Clean up non-conforming names

Thomas Rodgers trodgers@redhat.com
Fri May 31 20:50:00 GMT 2019


	* include/pstl/algorithm_impl.h (__parallel_set_union_op):
	Uglfiy copy_range1 and copy_range2
	* include/pstl/parallel_backend_tbb.h (struct __binary_no_op):
	Rename parameter _T to _Tp.
---
 libstdc++-v3/include/pstl/algorithm_impl.h       | 16 ++++++++--------
 libstdc++-v3/include/pstl/parallel_backend_tbb.h |  4 ++--
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/libstdc++-v3/include/pstl/algorithm_impl.h b/libstdc++-v3/include/pstl/algorithm_impl.h
index 3491e002c94..a224b2b3633 100644
--- a/libstdc++-v3/include/pstl/algorithm_impl.h
+++ b/libstdc++-v3/include/pstl/algorithm_impl.h
@@ -2855,22 +2855,22 @@ __parallel_set_union_op(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _
     const auto __n1 = __last1 - __first1;
     const auto __n2 = __last2 - __first2;
 
-    auto copy_range1 = [__is_vector](_ForwardIterator1 __begin, _ForwardIterator1 __end, _OutputIterator __res) {
+    auto __copy_range1 = [__is_vector](_ForwardIterator1 __begin, _ForwardIterator1 __end, _OutputIterator __res) {
         return __internal::__brick_copy(__begin, __end, __res, __is_vector);
     };
-    auto copy_range2 = [__is_vector](_ForwardIterator2 __begin, _ForwardIterator2 __end, _OutputIterator __res) {
+    auto __copy_range2 = [__is_vector](_ForwardIterator2 __begin, _ForwardIterator2 __end, _OutputIterator __res) {
         return __internal::__brick_copy(__begin, __end, __res, __is_vector);
     };
 
     // {1} {}: parallel copying just first sequence
     if (__n2 == 0)
         return __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first1, __last1, __result,
-                                                 copy_range1, std::true_type());
+                                                 __copy_range1, std::true_type());
 
     // {} {2}: parallel copying justmake  second sequence
     if (__n1 == 0)
         return __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first2, __last2, __result,
-                                                 copy_range2, std::true_type());
+                                                 __copy_range2, std::true_type());
 
     // testing  whether the sequences are intersected
     _ForwardIterator1 __left_bound_seq_1 = std::lower_bound(__first1, __last1, *__first2, __comp);
@@ -2882,7 +2882,7 @@ __parallel_set_union_op(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _
             std::forward<_ExecutionPolicy>(__exec),
             [=] {
                 __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first1, __last1, __result,
-                                                  copy_range1, std::true_type());
+                                                  __copy_range1, std::true_type());
             },
             [=] {
                 __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first2, __last2,
@@ -2901,7 +2901,7 @@ __parallel_set_union_op(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _
             std::forward<_ExecutionPolicy>(__exec),
             [=] {
                 __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first2, __last2, __result,
-                                                  copy_range2, std::true_type());
+                                                  __copy_range2, std::true_type());
             },
             [=] {
                 __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first1, __last1,
@@ -2920,7 +2920,7 @@ __parallel_set_union_op(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _
             //do parallel copying of [first1; left_bound_seq_1)
             [=] {
                 __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first1, __left_bound_seq_1,
-                                                  __res_or, copy_range1, std::true_type());
+                                                  __res_or, __copy_range1, std::true_type());
             },
             [=, &__result] {
                 __result = __internal::__parallel_set_op(
@@ -2942,7 +2942,7 @@ __parallel_set_union_op(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _
             //do parallel copying of [first2; left_bound_seq_2)
             [=] {
                 __internal::__pattern_walk2_brick(std::forward<_ExecutionPolicy>(__exec), __first2, __left_bound_seq_2,
-                                                  __res_or, copy_range2, std::true_type());
+                                                  __res_or, __copy_range2, std::true_type());
             },
             [=, &__result] {
                 __result = __internal::__parallel_set_op(
diff --git a/libstdc++-v3/include/pstl/parallel_backend_tbb.h b/libstdc++-v3/include/pstl/parallel_backend_tbb.h
index c6f5bb8d5ab..9c05ade0532 100644
--- a/libstdc++-v3/include/pstl/parallel_backend_tbb.h
+++ b/libstdc++-v3/include/pstl/parallel_backend_tbb.h
@@ -508,8 +508,8 @@ class __stable_sort_task : public tbb::task
 //! Binary operator that does nothing
 struct __binary_no_op
 {
-    template <typename _T>
-    void operator()(_T, _T)
+    template <typename _Tp>
+    void operator()(_Tp, _Tp)
     {
     }
 };
-- 
2.20.1



More information about the Gcc-patches mailing list