Re:Ask HN: How do I understand Rust?
by lobster_johnson on Friday January 27, 2017 @11:12PM
(#13504866)
In C++ the closest equivalent is probably unique_ptr [1], which only lets one reference exist at any given time and destroys the pointer when it goes out of scope, but also allows transferring the ownership to someone else. The C++ equivalent of Rust's Rc (reference counted pointer) is std::shared_ptr.
[1] http://en.cppreference.com/w/cpp/memory/unique_ptr