diff --git a/src/corelib/tools/qfunctionaltools_impl.h b/src/corelib/tools/qfunctionaltools_impl.h index 1f03b978e82..5878b90bd6a 100644 --- a/src/corelib/tools/qfunctionaltools_impl.h +++ b/src/corelib/tools/qfunctionaltools_impl.h @@ -12,6 +12,7 @@ #include #include +#include QT_BEGIN_NAMESPACE @@ -38,9 +39,16 @@ struct StorageByValue #undef MAKE_GETTER }; -template +template struct StorageEmptyBaseClassOptimization : Object { + StorageEmptyBaseClassOptimization(Object &&o) + : Object(std::move(o)) + {} + StorageEmptyBaseClassOptimization(const Object &o) + : Object(o) + {} + #define MAKE_GETTER(cvref) \ constexpr Object cvref object() cvref noexcept \ { return static_cast(*this); }