From 13a841469650bcade71c1aa4eb3558bee7c0b8a0 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Fri, 30 Dec 2022 14:23:17 +0100 Subject: [PATCH] Deprecate QTypeInfo::isPointer and isIntegral They're completely superseded by standard traits, and there are no more users in-tree. I'm not hiding them behind a QT_DEPRECATED_SINCE, because these are private APIs, so there's no source compatibility guarantees here. I'm also using [[deprecated]] directly to avoid an extra inclusion after the QtGlobal split. Change-Id: If649e52ffe51c5eba1c51da25b6fe0621a0b17b3 Reviewed-by: Thiago Macieira --- src/corelib/global/qtypeinfo.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h index 349382be463..3d1bac8be93 100644 --- a/src/corelib/global/qtypeinfo.h +++ b/src/corelib/global/qtypeinfo.h @@ -41,8 +41,8 @@ class QTypeInfo { public: enum { - isPointer = std::is_pointer_v, - isIntegral = std::is_integral_v, + isPointer [[deprecated("Use std::is_pointer instead")]] = std::is_pointer_v, + isIntegral [[deprecated("Use std::is_integral instead")]] = std::is_integral_v, isComplex = !std::is_trivial_v, isRelocatable = qIsRelocatable, isValueInitializationBitwiseZero = qIsValueInitializationBitwiseZero, @@ -54,8 +54,8 @@ class QTypeInfo { public: enum { - isPointer = false, - isIntegral = false, + isPointer [[deprecated("Use std::is_pointer instead")]] = false, + isIntegral [[deprecated("Use std::is_integral instead")]] = false, isComplex = false, isRelocatable = false, isValueInitializationBitwiseZero = false, @@ -89,8 +89,8 @@ class QTypeInfoMerger public: static constexpr bool isComplex = ((QTypeInfo::isComplex) || ...); static constexpr bool isRelocatable = ((QTypeInfo::isRelocatable) && ...); - static constexpr bool isPointer = false; - static constexpr bool isIntegral = false; + [[deprecated("Use std::is_pointer instead")]] static constexpr bool isPointer = false; + [[deprecated("Use std::is_integral instead")]] static constexpr bool isIntegral = false; static constexpr bool isValueInitializationBitwiseZero = false; }; @@ -106,8 +106,8 @@ class QTypeInfo> \ { \ public: \ enum { \ - isPointer = false, \ - isIntegral = false, \ + isPointer [[deprecated("Use std::is_pointer instead")]] = false, \ + isIntegral [[deprecated("Use std::is_integral instead")]] = false, \ isComplex = true, \ isRelocatable = true, \ isValueInitializationBitwiseZero = false, \ @@ -149,8 +149,8 @@ public: \ enum { \ isComplex = (((FLAGS) & Q_PRIMITIVE_TYPE) == 0) && !std::is_trivial_v, \ isRelocatable = !isComplex || ((FLAGS) & Q_RELOCATABLE_TYPE) || qIsRelocatable, \ - isPointer = std::is_pointer_v< TYPE >, \ - isIntegral = std::is_integral< TYPE >::value, \ + isPointer [[deprecated("Use std::is_pointer instead")]] = std::is_pointer_v< TYPE >, \ + isIntegral [[deprecated("Use std::is_integral instead")]] = std::is_integral< TYPE >::value, \ isValueInitializationBitwiseZero = qIsValueInitializationBitwiseZero, \ }; \ }