What is a smart pointer and when should I use one?
@lebyy▲ 0 net votes
Problem: What is a smart pointer and when should I use one? Fix (from the top answer): UPDATE This answer is rather old, and so describes what was 'good' at the time, which was smart pointers provided by the Boost library. Since C++11, the standard library has provided sufficient smart pointers types, and so you should favour the use of std::unique_ptr , std::shared_ptr and std::weak_ptr . There was…