Assume I have a set of unique_ptr:
std::unordered_set > my_set;
I\'m not sure what\'s the safe way to
You can use a std::map> instead of a set. Then you can add elements like this:
std::map>
std::unique_ptr instance(new MyClass); map.emplace(instance.get(), std::move(instance));