If I have a vector std::vector<int64_t> oldData
, can I use move semantics to move the data into another vector std::vector<uint8_t> newData
.
Instead of doing:
std::vector<uint8_t> newData(oldData.begin(),oldData.end());
Could I do
std::vector<uint8_t> newData = std::move(oldData);
Will this actually move the data instead of copying it and be more performant?