Programming Tips - C++: Convert a unique_pointer to a shared_pointer

Date: 2018jul25 Language: C++ Keywords: smart pointer Q. C++: Convert a unique_pointer to a shared_pointer A.
auto unique = std::make_unique<std::string>("test"); std::shared_ptr<std::string> shared = std::move(unique);
Source https://ds9a.nl/articles/posts/cpp-5/