fix(templates): fix FNoncopyable to satisfy the CMovable concept

This commit is contained in:
_Redstone_c_ 2023-02-17 23:31:24 +08:00
parent bae95fa438
commit f521c2b5d5

View File

@ -11,14 +11,18 @@ struct FNoncopyable
{ {
FNoncopyable() = default; FNoncopyable() = default;
FNoncopyable(const FNoncopyable&) = delete; FNoncopyable(const FNoncopyable&) = delete;
FNoncopyable(FNoncopyable&&) = default;
FNoncopyable& operator=(const FNoncopyable&) = delete; FNoncopyable& operator=(const FNoncopyable&) = delete;
FNoncopyable& operator=(FNoncopyable&&) = default;
}; };
/** A class indicates that a derived class cannot be moved. */ /** A class indicates that a derived class cannot be moved. */
struct FNonmovable struct FNonmovable
{ {
FNonmovable() = default; FNonmovable() = default;
FNonmovable(const FNonmovable&) = default;
FNonmovable(FNonmovable&&) = delete; FNonmovable(FNonmovable&&) = delete;
FNonmovable& operator=(const FNonmovable&) = default;
FNonmovable& operator=(FNonmovable&&) = delete; FNonmovable& operator=(FNonmovable&&) = delete;
}; };