Robot& operator=(Robot&) = default // Move Assignment Operator Robot& operator=(const Robot&) = default // Copy Assignment Operator
Robot(Robot&) = default // Move Constructor Robot(const Robot&) = default // Copy Constructor If you wanted to just use the default destructor and constructors with copy and move semantics you can do this: If you define a destructor, copy constructor, or copy assignment operator, then your class will not support move semantics, unless you explicitly add them. If you need to customize or prevent their action, then define or delete as necessary. If you just want the default, then you can explicitly declare them as defaults in the header.
explicitly specify what you want for a copy/move constructor, copy/move assignment operator, and virtual destructor). However, the best practice is to always define all 5 of the rules (i.e. If you don’t define any of those, and you also do not define the copy assignment operator nor the move assignment operator, then you don’t need to define any of the five. If you define the destructor, copy constructor, or move constructor, then all three should be defined.