CompactStorage: make it default-constructible again

When 30a8e79243 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 30a8e79243.

Pick-to: 6.7 6.6
Change-Id: Iaf1a9536c2e0b24a62fdd55c837478a3450da38c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
bb10
Marc Mutz 2024-02-13 16:07:30 +01:00
parent aedbc7ba7a
commit 1b89d747d7
1 changed files with 1 additions and 0 deletions

View File

@ -42,6 +42,7 @@ struct StorageByValue
template <typename Object, typename Tag = void>
struct StorageEmptyBaseClassOptimization : Object
{
StorageEmptyBaseClassOptimization() = default;
StorageEmptyBaseClassOptimization(Object &&o)
: Object(std::move(o))
{}