]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Work some more to get MS VC to like the code.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 7 Apr 2014 23:17:04 +0000 (23:17 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 7 Apr 2014 23:17:04 +0000 (23:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@32730 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/parallel.h

index dd6ee8bedfd0360e84cd5412d90ad55fdaecccb2..9a2e1751750e31b433145635958ae806e1ca4c83 100644 (file)
@@ -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>

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.