You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following insert overload appears to be broken in hopscotch_hash: std::pair<iterator, bool> insert(P&& value)
It seems the issue was the removal of the explicit conversion to value_type from this pull: #63
Adding it back fixes the issue: return insert_impl(value_type(std::forward<P>(value)));
Minimal code example to reproduce compilation failure. The same would compile with std::unordered_map.
#include <tsl/hopscotch_map.h>
#include <memory>
class Base {};
class Derived
: public Base {};
int main()
{
tsl::hopscotch_map<int, std::unique_ptr<Base>> m;
m.insert( std::make_pair(0, std::make_unique<Derived>()) );
return 0;
}
The text was updated successfully, but these errors were encountered:
The following insert overload appears to be broken in hopscotch_hash:
std::pair<iterator, bool> insert(P&& value)
It seems the issue was the removal of the explicit conversion to value_type from this pull:
#63
Adding it back fixes the issue:
return insert_impl(value_type(std::forward<P>(value)));
Minimal code example to reproduce compilation failure. The same would compile with std::unordered_map.
The text was updated successfully, but these errors were encountered: