I've attached a patch for unordered_map which solves the rvalue
reference problem. ÂFor efficiency, I've created a new
_M_emplace_bucket method rather than call emplace directly.
I've verified all libstdc++ tests pass (sorry for the previous
oversight) and am running the full GCC test suite now. ÂHowever, I'd
appreciate any feedback on whether this is a reasonable approach. ÂSTL
hacking is way outside my comfort zone. Â;-)
If this looks good, I'll take a stab at std::map.
I think you should remove the mapped_type() argument from the call to
_M_emplace_bucket. In C++11, the mapped_type is not required to be copyable
at all, just to be DefaultInsertable.