diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-04-18 14:07:32 +0200 |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-26 14:16:21 +0200 |
commit | d3e5fc0220e57d5a9bba35780915c53790ff249f (patch) | |
tree | 529b8e8cb514b0f0bd50e28c6561c3207bfc571d /src/corelib/concurrent/qtconcurrentcompilertest.h | |
parent | 83291e6a07a9b6dc6c2d05b4fd4492df79796bbf (diff) |
Support of lambdas in QtConcurrent::run
Reviewed-by: Joao
(cherry picked from commit 917f2ff617209bcc283eb3590b422bcf239c0537)
Change-Id: I837f18f043b18410c1d93b9f1156acf729dad510
Reviewed-on: http://codereview.qt.nokia.com/142
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
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 884badbfbd..c139c7a8b2 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 |