From 4cb06919aaa7be19f48b284c653aa2d98c2bb458 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 7 Aug 2024 11:16:20 +0200 Subject: [PATCH] qfloat16: remove IsIntegral work-around We now assume that is_integral works for qint128 if QT_SUPPORTS_INT128 is defined, so we no longer need to roll our own version of std::is_integral. Amends 0d85d0a72fd0136bd89e201d0cc1bf7fac2c24c8 (which is in 6.7, but we're only guaranteeing that std::is_integral works for qint128 since 6.8, so not picking all the way). Task-number: QTBUG-119901 Task-number: QTBUG-117637 Change-Id: I0651f1f17c1abfe4dc2b2d08ae4304fc8dcae092 Reviewed-by: Ivan Solovev Reviewed-by: Thiago Macieira (cherry picked from commit da580a12b10f33fcff5783ca595d1c53b5b8b7de) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/global/qfloat16.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h index 30dd9a60afc..f3f6051350c 100644 --- a/src/corelib/global/qfloat16.h +++ b/src/corelib/global/qfloat16.h @@ -53,18 +53,8 @@ class qfloat16 constexpr inline explicit Wrap(int value) : b16(quint16(value)) {} }; -#ifdef QT_SUPPORTS_INT128 template - using IsIntegral = std::disjunction, - std::is_same, qint128>, - std::is_same, quint128>>; -#else - template - using IsIntegral = std::is_integral; -#endif - template - using if_type_is_integral = std::enable_if_t>::value, - bool>; + using if_type_is_integral = std::enable_if_t>, bool>; public: using NativeType = QtPrivate::NativeFloat16Type;