This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][libstdc++-v3 parallel mode] Patch for PR 39546


As discussed.

Tested x86_64-unknown-linux-gnu: No regressions

Please approve for mainline.

2009-04-30  Johannes Singler  <singler@ira.uka.de>

        * PR libstdc++/39546
          include/parallel/algo.h (find_switch):
          Parametrize binder2nd with const T& instead of T.

Johannes

Index: include/parallel/algo.h
===================================================================
--- include/parallel/algo.h	(revision 145335)
+++ include/parallel/algo.h	(working copy)
@@ -155,8 +155,8 @@
 
       if (_GLIBCXX_PARALLEL_CONDITION(true))
         {
-          binder2nd<__gnu_parallel::equal_to<value_type, T> >
-            comp(__gnu_parallel::equal_to<value_type, T>(), val);
+          binder2nd<__gnu_parallel::equal_to<value_type, const T&> >
+            comp(__gnu_parallel::equal_to<value_type, const T&>(), val);
           return __gnu_parallel::find_template(begin, end, begin, comp,
                                                __gnu_parallel::
                                                find_if_selector()).first;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]