This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][libstdc++-v3 parallel mode] Patch for PR 39546
- From: Johannes Singler <singler at ira dot uka dot de>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 30 Apr 2009 16:41:11 +0200
- Subject: [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;