From fafae936a68bac1231b2de69b58e8248ae5dca2f Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Fri, 7 Jun 2019 23:00:53 +0200 Subject: QMetaType: fix an is_pod test that C++11 broke C++11 allows non-POD-types in unions, so the test didn't test anything. Use a static_assert over std::is_pod instead. Change-Id: Ida7ef0551ae6ae07357a987a409294d2a386be2f Reviewed-by: Ville Voutilainen --- src/corelib/kernel/qmetatype.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src') diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp index 311fb01fd0..754f5a13e4 100644 --- a/src/corelib/kernel/qmetatype.cpp +++ b/src/corelib/kernel/qmetatype.cpp @@ -587,13 +587,7 @@ QMetaTypeComparatorRegistry; typedef QMetaTypeFunctionRegistry QMetaTypeDebugStreamRegistry; -namespace -{ -union CheckThatItIsPod -{ // This should break if QMetaTypeInterface is not a POD type - QMetaTypeInterface iface; -}; -} +Q_STATIC_ASSERT(std::is_pod::value); Q_DECLARE_TYPEINFO(QCustomTypeInfo, Q_MOVABLE_TYPE); Q_GLOBAL_STATIC(QVector, customTypes) -- cgit v1.2.3