[Bug libstdc++/61143] [4.9/4.10 Regression] Arithmetic exception on emplacing into unordered_map moved out

felix at fontein dot de gcc-bugzilla@gcc.gnu.org
Tue May 13 15:26:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61143

--- Comment #9 from Felix Fontein <felix at fontein dot de> ---
Another workaround is to use reserve(), as in:

    std::unordered_map<int, int> b = std::move(a);
    a.reserve(1); // any number > 0 will do
    a.emplace(1, 1);



More information about the Gcc-bugs mailing list