A common misconception for developers coming from other languages is that std::move(x) performs a memory copy or resets the object.
In reality, std::move is just a static_cast to an rvalue reference (static_cast<T&&>(x)). It produces no machine code instructions whatsoever at runtime!
template <typename T>
constexpr std::remove_reference_t<T>&& move(T&& t) noexcept {
return static_cast<std::remove_reference_t<T>&&>(t);
}The actual movement happens inside the move constructor or move assignment operator that accepts T&& by stealing internal pointers (e.g. pData = other.pData; other.pData = nullptr;).