EmbeddedProto
EmbeddedProto copied to clipboard
Use rvalue references correctly
const rvalue reference doesn't give any advantages over the copy constructor, so there is no need of defining it, as an rvalue can also be used as a const lvalue. This PR creates move constructors which actually move the contents where possible.
One might need to #include <utility> for std::move() or use a static cast instead as it is equivalent (quoting from the manual):
It is exactly equivalent to a static_cast to an rvalue reference type.
I am working out how to properly test this. A bit more time is required.
Why has this been closed? Which outcome did your tests have?