diff options
Diffstat (limited to 'src/corelib/global/qglobal.h')
-rw-r--r-- | src/corelib/global/qglobal.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index b608489576..f56629faa1 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -591,11 +591,11 @@ Q_DECL_CONSTEXPR inline qint64 qRound64(float d) { return d >= 0.0f ? qint64(d + 0.5f) : qint64(d - float(qint64(d-1)) + 0.5f) + qint64(d-1); } template <typename T> -Q_DECL_CONSTEXPR inline const T &qMin(const T &a, const T &b) { return (a < b) ? a : b; } +constexpr inline const T &qMin(const T &a, const T &b) { return (a < b) ? a : b; } template <typename T> -Q_DECL_CONSTEXPR inline const T &qMax(const T &a, const T &b) { return (a < b) ? b : a; } +constexpr inline const T &qMax(const T &a, const T &b) { return (a < b) ? b : a; } template <typename T> -Q_DECL_CONSTEXPR inline const T &qBound(const T &min, const T &val, const T &max) +constexpr inline const T &qBound(const T &min, const T &val, const T &max) { return qMax(min, qMin(max, val)); } #ifndef Q_FORWARD_DECLARE_OBJC_CLASS @@ -1186,9 +1186,6 @@ namespace QtPrivate { //like std::enable_if template <bool B, typename T = void> struct QEnableIf; template <typename T> struct QEnableIf<true, T> { typedef T Type; }; - -template <bool B, typename T, typename F> struct QConditional { typedef T Type; }; -template <typename T, typename F> struct QConditional<false, T, F> { typedef F Type; }; } QT_END_NAMESPACE |