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
Let me rewrite the failing example above to an equivalent order of operations:
std::string &a = m[1]; // evaluate right-hand side
std::string &b = m[2]; // evaluate left-hand side
b = a; // assign
The problem is that the reference to a is invalidated in when the left-hand side is evaluated (because the underlying storage is resized), so it is invalid at the time of the assignment.
I don't think this is actually a bug in unordered_dense.
Hi! This issues seems to appear only if the value is of a non-trivial type.
This code
prints
Expected output is
If I "pre-create" the value in the map then it works:
System:
The text was updated successfully, but these errors were encountered: