[Bug middle-end/90959] hash_map can be copied but leads to a double-free after assignment
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Mar 6 01:04:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90959
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org
--- Comment #3 from Martin Sebor <msebor at gcc dot gnu.org> ---
I can put together a patch to define the assignment. Containers need to be
assignable in order to be used as elements in other containers or as members of
classes/structs that are. Otherwise, the limitation has to be worked around by
hand-coding the assignment for hash_map (and anything else) in the class/struct
of which it's a member. I've had to do that twice already and it's error-prone
each time.
More information about the Gcc-bugs
mailing list