diff options
Diffstat (limited to 'src/corelib/concurrent/qtconcurrentcompilertest.h')
-rw-r--r-- | src/corelib/concurrent/qtconcurrentcompilertest.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/corelib/concurrent/qtconcurrentcompilertest.h b/src/corelib/concurrent/qtconcurrentcompilertest.h index 884badb..c139c7a 100644 --- a/src/corelib/concurrent/qtconcurrentcompilertest.h +++ b/src/corelib/concurrent/qtconcurrentcompilertest.h @@ -57,6 +57,20 @@ QT_MODULE(Core) # define QT_TYPENAME typename #endif +namespace QtPrivate { + +template<class T> +class HasResultType { + typedef char Yes; + typedef void *No; + template<typename U> static Yes test(int, const typename U::result_type * = 0); + template<typename U> static No test(double); +public: + enum { Value = (sizeof(test<T>(0)) == sizeof(Yes)) }; +}; + +} + QT_END_NAMESPACE QT_END_HEADER |