std::map<std::string, std::shared_ptr<SomeClass>> map_string_to_object_pointer;
map_string_to_object_pointer["abcd"] = std::make_unique<SomeClass>();
The question is about assigning a unique_ptr to a shared_ptr. This is an existing code and hence just trying to understand if its a bad programming or assigning unique to shared_ptr implicitly convers the unique_ptr into shared? There is no compiler warning due to this.