diff --git a/src/corelib/kernel/qproperty.cpp b/src/corelib/kernel/qproperty.cpp index a4135b1f6f9..32b8882369f 100644 --- a/src/corelib/kernel/qproperty.cpp +++ b/src/corelib/kernel/qproperty.cpp @@ -267,6 +267,11 @@ void Qt::endPropertyUpdateGroup() } } +// check everything stored in QPropertyBindingPrivate's union is trivially destructible +// (though the compiler would also complain if that weren't the case) +static_assert(std::is_trivially_destructible_v); +static_assert(std::is_trivially_destructible_v); + QPropertyBindingPrivate::~QPropertyBindingPrivate() { if (firstObserver) diff --git a/src/corelib/kernel/qproperty_p.h b/src/corelib/kernel/qproperty_p.h index 5105fd63437..d80ed211026 100644 --- a/src/corelib/kernel/qproperty_p.h +++ b/src/corelib/kernel/qproperty_p.h @@ -254,9 +254,8 @@ protected: is stored somewhere else. To make efficient use of the space, we instead provide a scratch space for QQmlPropertyBinding (which stores further binding information there). Anything stored in the union must be trivially destructible. + (checked in qproperty.cpp) */ - static_assert(std::is_trivially_destructible_v); - static_assert(std::is_trivially_destructible_v); using DeclarativeErrorCallback = void(*)(QPropertyBindingPrivate *); union { QPropertyBindingSourceLocation location;