From: Wolfgang Bangerth Date: Mon, 7 Apr 2014 23:17:04 +0000 (+0000) Subject: Work some more to get MS VC to like the code. X-Git-Tag: v8.2.0-rc1~640 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=666bfc89e3fa0dea67fb49190e97dad10b4f1c00;p=dealii.git 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 --- 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 @@ -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