diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2020-03-05 15:57:07 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2020-03-06 18:06:43 +0100 |
commit | c1bb6285720513b9b22b552ca30af3c1501a7761 (patch) | |
tree | 96f3aa2f3d524924dd4f7dcd43a3392bed127f04 | |
parent | 08b9e663470137e04b1f19522606707a652b3ae5 (diff) |
Port from deprecated std::is_pod to is_trivial + is_standard_layout
The std::is_pod trait is deprecated in C++20; is_trivial
and is_standard_layout exist since C++11.
Change-Id: I4b901d8edf1a55001764445aee9c338d3dc23b21
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r-- | src/corelib/kernel/qmetatype.cpp | 3 | ||||
-rw-r--r-- | src/corelib/serialization/qcborvalue_p.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index 356a675517..9fc0659cf2 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -589,7 +589,8 @@ QMetaTypeComparatorRegistry; typedef QMetaTypeFunctionRegistry<QtPrivate::AbstractDebugStreamFunction,int> QMetaTypeDebugStreamRegistry; -Q_STATIC_ASSERT(std::is_pod<QMetaTypeInterface>::value); +Q_STATIC_ASSERT(std::is_trivial<QMetaTypeInterface>::value); +Q_STATIC_ASSERT(std::is_standard_layout<QMetaTypeInterface>::value); Q_DECLARE_TYPEINFO(QCustomTypeInfo, Q_MOVABLE_TYPE); Q_GLOBAL_STATIC(QVector<QCustomTypeInfo>, customTypes) diff --git a/src/corelib/serialization/qcborvalue_p.h b/src/corelib/serialization/qcborvalue_p.h index 48818e4c63..a74ac2ba10 100644 --- a/src/corelib/serialization/qcborvalue_p.h +++ b/src/corelib/serialization/qcborvalue_p.h @@ -115,7 +115,8 @@ struct ByteData QStringView asStringView() const{ return QStringView(utf16(), len / 2); } QString asQStringRaw() const { return QString::fromRawData(utf16(), len / 2); } }; -Q_STATIC_ASSERT(std::is_pod<ByteData>::value); +Q_STATIC_ASSERT(std::is_trivial<ByteData>::value); +Q_STATIC_ASSERT(std::is_standard_layout<ByteData>::value); } // namespace QtCbor Q_DECLARE_TYPEINFO(QtCbor::Element, Q_PRIMITIVE_TYPE); |