This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/61143] [4.9/4.10 Regression] Arithmetic exception on emplacing into unordered_map moved out
- From: "fdumont at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 12 May 2014 06:43:32 +0000
- Subject: [Bug libstdc++/61143] [4.9/4.10 Regression] Arithmetic exception on emplacing into unordered_map moved out
- Auto-submitted: auto-generated
- References: <bug-61143-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61143
--- Comment #4 from FranÃois Dumont <fdumont at gcc dot gnu.org> ---
I simply considered that the moved container instance wouldn't be reused this
way, just potentially for some immutable operations. I should have checked the
Standard regarding the meaning of "valid by unspecified state".
There are indeed numerous places to consider to make this code and any other
mutable code valid. I would also prefer to avoid those checks but I remember
that I needed to leave the container in this state for exception guaranty
reasons in some move operations. I will recall rational of this as soon as I
can take a look to the code.