3 ms·
I think the GP was accusing you of "side tracking" by bringing up std::shared_ptr in the first place. My post above was about how C++ smart-pointers compare fa
by derefr 8y ago
I think the GP was accusing you of "side tracking" by bringing up std::shared_ptr in the first place.
My post above was about how C++ smart-pointers compare favorably to Rust's oft-considered-"unique" ownership/borrowing system. The particular STL features that cause equivalent "compile-time magic" to happen to what you get from Rust's semantics, are those of std::uniq_ptr and std::move, not those of std::shared_ptr. So the value (or lack thereof) of std::shared_ptr, isn't really a knock against the value of the C++ STL smart-pointers collection as a whole—you can entirely ignore the existence of std::shared_ptr (I do!) and still think C++ STL smart-pointers are the cat's pyjamas.