[potential bug?] UObject didn't generate default move-constructor and move-assignment operator

I am not sure what this issue will affect, but according to
rule of five if you implement any one of following function, you should implement them all:

virtual ~UMyClass()  = default;
UMyClass(const UMyClass&) = default;
UMyClass& operator=(const UMyClass&) = default;
UMyClass(UMyClass&&) = default;
UMyClass& operator=(UMyClass&&) = default;

When I trace UE4 source code, I find out that in MyClass.generated.h we have copy-constructor:

private: \
    /** Private copy-constructor, should never be used */ \
    NO_API UMyClass(const UMyClass& InCopy); \

in ObjectBase.h, we have Copy assignment operator:

#define DECLARE_CLASS( TClass, TSuperClass, TStaticFlags, TStaticCastFlags, TPackage, TRequiredAPI  ) \
private: \
    TClass & operator=(TClass const &); 

But I can not find Move constructor and Move assignment operator be generated, maybe this is a potential bug?

Hi ,

The UObject class was never intended to be a value type, so there should typically never be a need to have one moved, copied, or assigned. In that regard, this is not actually a bug.

However, I brought up your question with a few of the Developers here and it sparked a bit of a discussion about whether or not we should explicitly disable these functions, and if we do disable them, how to do so since Visual Studio 2015 supports a different method for doing so that does not work in Visual Studio 2013. The end result of that discussion was that one of the Developers made some changes so that move constructors will be explicitly disabled in generated code. You will see this in a future released version of the Engine.