Move semantic(s)

C++ std::move and Rust's move are different. std::move leaves behind the origin in a valid (but "undefined", whatever that is) state, usable and later to be deconstructed. Rust leaves the origin destroyed and unusable. If you try to use the origin after the move, Rust compiler yells at you.

So types in C++ must have a "moved-from" state, which is the "valid but undefined" thing. For std::unique_ptr and std::shared_ptr it is null. Technically you can't implement a non-null unique pointer in C++, because it has to be able to be moved from.

Types in Rust does not need to have an empty state. Box<T> cannot be null. Arc cannot be null. That is good.

C++ move constructors and assignments should be noexcept, otherwise std::vector won't use them.

Reference: https://www.thecodedmessage.com/posts/cpp-move/