Is it safe to perform std::move
on std::optional<std::vector<int>>
?. It's not giving me any compiler or runtime error, but would like to know whether this is valid. This is my sample code snippet.
std::optional<std::vector<int>> from;
// do computation...
auto to = std::move(from);
// do computation...