c++ - Why would std::unordered_map::emplace() fail? -


i have std::unordered_map emplace() object via:

my_map.emplace(std::piecewise_construct,                std::forward_as_tuple(key),                std::forward_as_tuple(value1, value2)); 

this fails @ point during runtime false in second position of returned tuple. there way more information what's going on? top doesn't show trouble memory.

a false in .second means "equivalent element present." in such case, iterator in .first points equivalent element.

so what's happening have key in map, , can use .first on return value access it.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -