2022-02-03 08:45:34 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "CoreTypes.h"
|
|
|
|
|
|
|
|
NAMESPACE_REDCRAFT_BEGIN
|
|
|
|
NAMESPACE_MODULE_BEGIN(Redcraft)
|
|
|
|
NAMESPACE_MODULE_BEGIN(Utility)
|
|
|
|
|
|
|
|
struct FNoncopyable
|
|
|
|
{
|
2022-02-03 14:25:02 +00:00
|
|
|
FNoncopyable() = default;
|
2022-02-03 08:45:34 +00:00
|
|
|
FNoncopyable(const FNoncopyable&) = delete;
|
|
|
|
FNoncopyable& operator=(const FNoncopyable&) = delete;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct FNonmovable
|
|
|
|
{
|
2022-02-03 14:25:02 +00:00
|
|
|
FNonmovable() = default;
|
2022-04-05 09:00:33 +00:00
|
|
|
FNonmovable(FNonmovable&&) = delete;
|
|
|
|
FNonmovable& operator=(FNonmovable&&) = delete;
|
2022-02-03 08:45:34 +00:00
|
|
|
};
|
|
|
|
|
2022-11-18 15:17:54 +00:00
|
|
|
// 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;
|
|
|
|
};
|
2022-02-03 08:45:34 +00:00
|
|
|
|
|
|
|
NAMESPACE_MODULE_END(Utility)
|
|
|
|
NAMESPACE_MODULE_END(Redcraft)
|
|
|
|
NAMESPACE_REDCRAFT_END
|