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
spp::sparse_hash_map<uint64_t, uint64_t> map0;
map0.emplace(0, 0);
auto map1 = std::move(map0);
//map0 = spp::sparse_hash_map<uint64_t, uint64_t>{}; // uncomment this to pass the test
auto found = map0.find(0); // segfaults here
CHECK(found == end(map0));
The text was updated successfully, but these errors were encountered:
What is the intended behavior here? A moved-from object is generally assumed to be in an undefined state. Presumably, this means that it can still be validly-destructed, but you can't do much else with it. I guess, the most robust behavior would be for the moved-from map to be empty ; is that what you would expect? Any thoughts @greg7mdp?
@rob-p yes indeed the moved-from object should be in a consistent state, so this is a bug. I'll look into it when I have some time. In the meanwhile maybe phmap is a good alternative.
Linux/Darwin gcc/clang MWE
The text was updated successfully, but these errors were encountered: