diff options
author | Alexander Volkov <a.volkov@rusbitech.ru> | 2017-01-20 15:58:10 +0300 |
---|---|---|
committer | Alexander Volkov <a.volkov@rusbitech.ru> | 2017-01-27 10:30:31 +0000 |
commit | 30d0e1770c3d917d5bdae5e8766e401b4f1b4c2b (patch) | |
tree | 8208e4139218442c15cb3bccc13a659d15caa78a /src/corelib/io | |
parent | d03ba0e895a3719ce527f3d7ee9262fb26065332 (diff) |
Use std::enable_if instead of QEnableIf
Change-Id: Ideca8283141484cb6da47c50333f5c96e416f082
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/io')
-rw-r--r-- | src/corelib/io/qdebug.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/io/qdebug.h b/src/corelib/io/qdebug.h index abc2abeaec..61059dd694 100644 --- a/src/corelib/io/qdebug.h +++ b/src/corelib/io/qdebug.h @@ -365,7 +365,7 @@ Q_CORE_EXPORT QDebug qt_QMetaEnum_debugOperator(QDebug&, int value, const QMetaO Q_CORE_EXPORT QDebug qt_QMetaEnum_flagDebugOperator(QDebug &dbg, quint64 value, const QMetaObject *meta, const char *name); template<typename T> -typename QtPrivate::QEnableIf<QtPrivate::IsQEnumHelper<T>::Value, QDebug>::Type +typename std::enable_if<QtPrivate::IsQEnumHelper<T>::Value, QDebug>::type operator<<(QDebug dbg, T value) { const QMetaObject *obj = qt_getEnumMetaObject(value); @@ -374,9 +374,9 @@ operator<<(QDebug dbg, T value) } template <class T> -inline typename QtPrivate::QEnableIf< +inline typename std::enable_if< QtPrivate::IsQEnumHelper<T>::Value || QtPrivate::IsQEnumHelper<QFlags<T> >::Value, - QDebug>::Type + QDebug>::type qt_QMetaEnum_flagDebugOperator_helper(QDebug debug, const QFlags<T> &flags) { const QMetaObject *obj = qt_getEnumMetaObject(T()); @@ -385,9 +385,9 @@ qt_QMetaEnum_flagDebugOperator_helper(QDebug debug, const QFlags<T> &flags) } template <class T> -inline typename QtPrivate::QEnableIf< +inline typename std::enable_if< !QtPrivate::IsQEnumHelper<T>::Value && !QtPrivate::IsQEnumHelper<QFlags<T> >::Value, - QDebug>::Type + QDebug>::type qt_QMetaEnum_flagDebugOperator_helper(QDebug debug, const QFlags<T> &flags) #else // !QT_NO_QOBJECT && !Q_QDOC template <class T> @@ -402,7 +402,7 @@ template<typename T> inline QDebug operator<<(QDebug debug, const QFlags<T> &flags) { // We have to use an indirection otherwise specialisation of some other overload of the - // operator<< the compiler would try to instantiate QFlags<T> for the QEnableIf + // operator<< the compiler would try to instantiate QFlags<T> for the std::enable_if return qt_QMetaEnum_flagDebugOperator_helper(debug, flags); } |