Insert in unordered map calls constructor
问题 In order to avoid duplication of elements, I'm building a class that holds elements and provide an acces to them. My elements ( DynLibrary ) are movable but not copyable class DynLibrary { public: DynLibrary() : _handle(nullptr) {} DynLibrary(const std::string& path) { DynLibrary::open(path); } DynLibrary(const DynLibrary&) = delete; DynLibrary(DynLibrary&&) = default; ~DynLibrary() { DynLibrary::close(); } ... } Those object are allocated in an unordered_map which key is the path that