diff --git a/src/corelib/concurrent/qtconcurrentfunctionwrappers.h b/src/corelib/concurrent/qtconcurrentfunctionwrappers.h index 4c4714fe45..fa675eb336 100644 --- a/src/corelib/concurrent/qtconcurrentfunctionwrappers.h +++ b/src/corelib/concurrent/qtconcurrentfunctionwrappers.h @@ -195,6 +195,18 @@ QtConcurrent::ConstMemberFunctionWrapper createFunctionWrapper(T (C::*func return QtConcurrent::ConstMemberFunctionWrapper(func); } + +template +void *lazyResultType_helper(int, typename T::result_type * = 0); +template +char lazyResultType_helper(double); + +template (0)) != sizeof(void*)> +struct LazyResultType { typedef typename Functor::result_type Type; }; +template +struct LazyResultType { typedef void Type; }; + + template struct ReduceResultType; @@ -213,7 +225,7 @@ struct ReduceResultType template struct MapResultType { - typedef typename MapFunctor::result_type ResultType; + typedef typename LazyResultType::Type ResultType; }; template @@ -233,7 +245,7 @@ struct MapResultType template