summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2017-01-20 15:58:10 +0300
committerAlexander Volkov <a.volkov@rusbitech.ru>2017-01-27 10:30:31 +0000
commit30d0e1770c3d917d5bdae5e8766e401b4f1b4c2b (patch)
tree8208e4139218442c15cb3bccc13a659d15caa78a /src/corelib/global
parentd03ba0e895a3719ce527f3d7ee9262fb26065332 (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/global')
-rw-r--r--src/corelib/global/qnumeric_p.h4
-rw-r--r--src/corelib/global/qtypeinfo.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/global/qnumeric_p.h b/src/corelib/global/qnumeric_p.h
index 01b8772ee1..62add95533 100644
--- a/src/corelib/global/qnumeric_p.h
+++ b/src/corelib/global/qnumeric_p.h
@@ -174,7 +174,7 @@ static inline bool qt_is_finite(float f)
// Unsigned overflow math
//
namespace {
-template <typename T> inline typename QtPrivate::QEnableIf<std::is_unsigned<T>::value, bool>::Type
+template <typename T> inline typename std::enable_if<std::is_unsigned<T>::value, bool>::type
add_overflow(T v1, T v2, T *r)
{
// unsigned additions are well-defined
@@ -182,7 +182,7 @@ add_overflow(T v1, T v2, T *r)
return v1 > T(v1 + v2);
}
-template <typename T> inline typename QtPrivate::QEnableIf<std::is_unsigned<T>::value, bool>::Type
+template <typename T> inline typename std::enable_if<std::is_unsigned<T>::value, bool>::type
mul_overflow(T v1, T v2, T *r)
{
// use the next biggest type
diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h
index 8aa5cb4fb4..53f6b3fff6 100644
--- a/src/corelib/global/qtypeinfo.h
+++ b/src/corelib/global/qtypeinfo.h
@@ -124,7 +124,7 @@ struct QTypeInfoQuery : public QTypeInfo<T>
// if QTypeInfo<T>::isRelocatable exists, use it
template <typename T>
-struct QTypeInfoQuery<T, typename QtPrivate::QEnableIf<QTypeInfo<T>::isRelocatable || true>::Type> : public QTypeInfo<T>
+struct QTypeInfoQuery<T, typename std::enable_if<QTypeInfo<T>::isRelocatable || true>::type> : public QTypeInfo<T>
{};
/*!