summaryrefslogtreecommitdiffstats
path: root/src/corelib/concurrent/qtconcurrentfunctionwrappers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/concurrent/qtconcurrentfunctionwrappers.h')
-rw-r--r--src/corelib/concurrent/qtconcurrentfunctionwrappers.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/corelib/concurrent/qtconcurrentfunctionwrappers.h b/src/corelib/concurrent/qtconcurrentfunctionwrappers.h
index a79ad1c..4bf2736 100644
--- a/src/corelib/concurrent/qtconcurrentfunctionwrappers.h
+++ b/src/corelib/concurrent/qtconcurrentfunctionwrappers.h
@@ -195,17 +195,10 @@ QtConcurrent::ConstMemberFunctionWrapper<T, C> createFunctionWrapper(T (C::*func
return QtConcurrent::ConstMemberFunctionWrapper<T, C>(func);
}
-
-template<typename T>
-void *lazyResultType_helper(int, typename T::result_type * = 0);
-template<typename T>
-char lazyResultType_helper(double);
-
-template <typename Functor, bool foo = sizeof(lazyResultType_helper<Functor>(0)) != sizeof(void*)>
+template <typename Functor, bool foo = HasResultType<Functor>::Value>
struct LazyResultType { typedef typename Functor::result_type Type; };
template <typename Functor>
-struct LazyResultType<Functor, true> { typedef void Type; };
-
+struct LazyResultType<Functor, false> { typedef void Type; };
template <class T>
struct ReduceResultType;