This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]