Will dereferencing an r-value reference do anything?
Advertisements So let’s say I have this code: std::unique_ptr<int> ptr = std::make_unique<int>(10); int val = *std::move(ptr); // Anything using ptr after I know that std::move gives us an r-value reference to the unique_ptr, and I don’t think dereference will steal the resources from ptr like a move assignment operator would, so would this code be… Read More Will dereferencing an r-value reference do anything?