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
Post a Comment