diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2011-05-19 14:43:53 +0200 |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-05-26 14:16:20 +0200 |
commit | 83291e6a07a9b6dc6c2d05b4fd4492df79796bbf (patch) | |
tree | 354a5034f87ec520c2062422e6645c339c4d0f35 /src | |
parent | 6794d0883cb3255d76ab6d4fe911a43b0ed6c013 (diff) |
Add QtPrivate::QEnableIf
Needed for QtConcurrent.
Like the new std::enable_if (in c++0x)
Reviewed-by: Joao
(cherry picked from commit 837f18f043b18410c1d93b9f1156acf729dad510)
Change-Id: I837f18f043b18410c1d93b9f1156acf729dad510
Reviewed-on: http://codereview.qt.nokia.com/141
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/global/qglobal.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 3cc12aaf82..445b65ba0d 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -2790,6 +2790,12 @@ QT_LICENSED_MODULE(Sensors) # define QT_NO_RAWFONT #endif +namespace QtPrivate { +//like std::enable_if +template <bool B, typename T = void> struct QEnableIf; +template <typename T> struct QEnableIf<true, T> { typedef T Type; }; +} + QT_END_NAMESPACE QT_END_HEADER |