summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qnumeric.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/global/qnumeric.cpp')
-rw-r--r--src/corelib/global/qnumeric.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/global/qnumeric.cpp b/src/corelib/global/qnumeric.cpp
index e492e3f02a..a46039c5da 100644
--- a/src/corelib/global/qnumeric.cpp
+++ b/src/corelib/global/qnumeric.cpp
@@ -458,6 +458,8 @@ Q_CORE_EXPORT quint64 qFloatDistance(double a, double b)
Returns true if the absolute value of \a f is within 0.00001f of 0.0.
*/
+namespace QtNumericTests {
+
template <typename T> static constexpr T max = std::numeric_limits<T>::max();
template <typename T> static constexpr T min = std::numeric_limits<T>::min();
@@ -489,4 +491,6 @@ static_assert(qt_saturate<int>(min<qint64>) == min<int>);
static_assert(qt_saturate<unsigned>(min<qint64>) == 0);
static_assert(qt_saturate<quint64>(min<qint64>) == 0);
+} // namespace QtNumericTests
+
QT_END_NAMESPACE