fix(templates): fix FSingleton not working correctly with EBO on MSVC

make CAnyCustomStorage satisfy the concept of FSingleton
This commit is contained in:
2022-11-18 23:17:54 +08:00
parent a4ac19673f
commit 6a70d4273e
4 changed files with 24 additions and 13 deletions

View File

@ -20,7 +20,15 @@ struct FNonmovable
FNonmovable& operator=(FNonmovable&&) = delete;
};
struct FSingleton : public FNoncopyable, public FNonmovable { };
// Multiple inheritance is no longer used here, as that would break the EBO in MSVC
struct FSingleton // : FNoncopyable, FNonmovable
{
FSingleton() = default;
FSingleton(const FSingleton&) = delete;
FSingleton(FSingleton&&) = delete;
FSingleton& operator=(const FSingleton&) = delete;
FSingleton& operator=(FSingleton&&) = delete;
};
NAMESPACE_MODULE_END(Utility)
NAMESPACE_MODULE_END(Redcraft)