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 <thiago.macieira@intel.com>
This commit is contained in:
parent
b41c44d966
commit
13a8414696
@ -41,8 +41,8 @@ class QTypeInfo
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum {
|
enum {
|
||||||
isPointer = std::is_pointer_v<T>,
|
isPointer [[deprecated("Use std::is_pointer instead")]] = std::is_pointer_v<T>,
|
||||||
isIntegral = std::is_integral_v<T>,
|
isIntegral [[deprecated("Use std::is_integral instead")]] = std::is_integral_v<T>,
|
||||||
isComplex = !std::is_trivial_v<T>,
|
isComplex = !std::is_trivial_v<T>,
|
||||||
isRelocatable = qIsRelocatable<T>,
|
isRelocatable = qIsRelocatable<T>,
|
||||||
isValueInitializationBitwiseZero = qIsValueInitializationBitwiseZero<T>,
|
isValueInitializationBitwiseZero = qIsValueInitializationBitwiseZero<T>,
|
||||||
@ -54,8 +54,8 @@ class QTypeInfo<void>
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum {
|
enum {
|
||||||
isPointer = false,
|
isPointer [[deprecated("Use std::is_pointer instead")]] = false,
|
||||||
isIntegral = false,
|
isIntegral [[deprecated("Use std::is_integral instead")]] = false,
|
||||||
isComplex = false,
|
isComplex = false,
|
||||||
isRelocatable = false,
|
isRelocatable = false,
|
||||||
isValueInitializationBitwiseZero = false,
|
isValueInitializationBitwiseZero = false,
|
||||||
@ -89,8 +89,8 @@ class QTypeInfoMerger
|
|||||||
public:
|
public:
|
||||||
static constexpr bool isComplex = ((QTypeInfo<Ts>::isComplex) || ...);
|
static constexpr bool isComplex = ((QTypeInfo<Ts>::isComplex) || ...);
|
||||||
static constexpr bool isRelocatable = ((QTypeInfo<Ts>::isRelocatable) && ...);
|
static constexpr bool isRelocatable = ((QTypeInfo<Ts>::isRelocatable) && ...);
|
||||||
static constexpr bool isPointer = false;
|
[[deprecated("Use std::is_pointer instead")]] static constexpr bool isPointer = false;
|
||||||
static constexpr bool isIntegral = false;
|
[[deprecated("Use std::is_integral instead")]] static constexpr bool isIntegral = false;
|
||||||
static constexpr bool isValueInitializationBitwiseZero = false;
|
static constexpr bool isValueInitializationBitwiseZero = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -106,8 +106,8 @@ class QTypeInfo<CONTAINER<T...>> \
|
|||||||
{ \
|
{ \
|
||||||
public: \
|
public: \
|
||||||
enum { \
|
enum { \
|
||||||
isPointer = false, \
|
isPointer [[deprecated("Use std::is_pointer instead")]] = false, \
|
||||||
isIntegral = false, \
|
isIntegral [[deprecated("Use std::is_integral instead")]] = false, \
|
||||||
isComplex = true, \
|
isComplex = true, \
|
||||||
isRelocatable = true, \
|
isRelocatable = true, \
|
||||||
isValueInitializationBitwiseZero = false, \
|
isValueInitializationBitwiseZero = false, \
|
||||||
@ -149,8 +149,8 @@ public: \
|
|||||||
enum { \
|
enum { \
|
||||||
isComplex = (((FLAGS) & Q_PRIMITIVE_TYPE) == 0) && !std::is_trivial_v<TYPE>, \
|
isComplex = (((FLAGS) & Q_PRIMITIVE_TYPE) == 0) && !std::is_trivial_v<TYPE>, \
|
||||||
isRelocatable = !isComplex || ((FLAGS) & Q_RELOCATABLE_TYPE) || qIsRelocatable<TYPE>, \
|
isRelocatable = !isComplex || ((FLAGS) & Q_RELOCATABLE_TYPE) || qIsRelocatable<TYPE>, \
|
||||||
isPointer = std::is_pointer_v< TYPE >, \
|
isPointer [[deprecated("Use std::is_pointer instead")]] = std::is_pointer_v< TYPE >, \
|
||||||
isIntegral = std::is_integral< TYPE >::value, \
|
isIntegral [[deprecated("Use std::is_integral instead")]] = std::is_integral< TYPE >::value, \
|
||||||
isValueInitializationBitwiseZero = qIsValueInitializationBitwiseZero<TYPE>, \
|
isValueInitializationBitwiseZero = qIsValueInitializationBitwiseZero<TYPE>, \
|
||||||
}; \
|
}; \
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user