From 666bfc89e3fa0dea67fb49190e97dad10b4f1c00 Mon Sep 17 00:00:00 2001
From: Wolfgang Bangerth <bangerth@math.tamu.edu>
Date: Mon, 7 Apr 2014 23:17:04 +0000
Subject: [PATCH] Work some more to get MS VC to like the code.

git-svn-id: https://svn.dealii.org/trunk@32730 0785d39b-7218-0410-832d-ea1e28bc413d
---
 deal.II/include/deal.II/base/parallel.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/deal.II/include/deal.II/base/parallel.h b/deal.II/include/deal.II/base/parallel.h
index dd6ee8bedf..9a2e175175 100644
--- a/deal.II/include/deal.II/base/parallel.h
+++ b/deal.II/include/deal.II/base/parallel.h
@@ -475,8 +475,9 @@ namespace parallel
     f (begin, end);
 #  else
     // work around a problem with MS VC++ where there is no const
-    // operator() in Function
-    Function(f) (begin, end);
+    // operator() in 'Function' if 'Function' is the result of std::bind
+    Function ff = f;
+    ff (begin, end);
 #  endif
 #else
     tbb::parallel_for (tbb::blocked_range<RangeType>
@@ -761,8 +762,9 @@ namespace parallel
     return f (begin, end);
 #  else
     // work around a problem with MS VC++ where there is no const
-    // operator() in Function
-    return Function(f) (begin, end);
+    // operator() in 'Function' if 'Function' is the result of std::bind
+    Function ff = f;
+    return ff (begin, end);
 #  endif
 #else
     internal::ReductionOnSubranges<ResultType,Function>
-- 
2.39.5