Is there any point implementing a move constructor and move assignment operator for a struct or class that contains only primitive types? For instance,
struct Foo
{
float x;
float y;
float z;
/// ... ctor, copy ctor, assignment overload, etc...
};
I can see that, if I had something more complex, like:
struct Bar
{
float x,y,z;
std::string Name;
};
where I'd rather move Name
than copy it, a move ctor would make sense. However, "moving" a float doesn't (semantically) make sense to me.
Thoughts?