From a2be9f7a39271d165182e445448b9c55c16a9b20 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 13 Feb 2024 16:07:30 +0100 Subject: [PATCH] CompactStorage: make it default-constructible again When 30a8e79243084017d23f1c765d5f1cbb86564191 added constructors as a work-arund for an MSVC issue, the default contructor became deleted. This hasn't caused trouble so far, as all users apparently pass a payload object, but I'm about to merge a new user that doesn't, so this came up. Fix by bringing the default ctor back using =default. Amends 30a8e79243084017d23f1c765d5f1cbb86564191. Pick-to: 6.6 Change-Id: Iaf1a9536c2e0b24a62fdd55c837478a3450da38c Reviewed-by: Fabian Kosmale (cherry picked from commit 1b89d747d7da7bffd515a5521e7dd5212c95f7af) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/tools/qfunctionaltools_impl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/corelib/tools/qfunctionaltools_impl.h b/src/corelib/tools/qfunctionaltools_impl.h index 5878b90bd6a..0942d5fe7d8 100644 --- a/src/corelib/tools/qfunctionaltools_impl.h +++ b/src/corelib/tools/qfunctionaltools_impl.h @@ -42,6 +42,7 @@ struct StorageByValue template struct StorageEmptyBaseClassOptimization : Object { + StorageEmptyBaseClassOptimization() = default; StorageEmptyBaseClassOptimization(Object &&o) : Object(std::move(o)) {}