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>
This commit is contained in:
Olivier Goffart 2011-05-19 14:43:53 +02:00 committed by Qt Continuous Integration System
parent 6794d0883c
commit 83291e6a07

View File

@ -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