I have a base class and its subclass:
class Base { public: virtual void hi() { cout << \"hi\" << endl; } }; class Derived : pub
In the above listed example, (1) returns an rvalue but (2) is not an rvalue and is attempting a copy on the unique_ptr, which you cannot do for a unique_ptr.
Using move works because you are treating the unique_ptr at that point as an rvalue.