[Bug libstdc++/51866] [c++0x][4.7 Regression] unordered_multiset compares moved-out values
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jan 16 12:54:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51866
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-16 12:38:56 UTC ---
the fix is to move the declaration of __k later, initializing it from the value
in the new node, where it's been moved to:
this->_M_extract()(__new_node->_M_v)
computing the hash code above can be done from
this->_M_hash_code(this->_M_extract()(__v))
instead of this->_M_hash_code(__k)
More information about the Gcc-bugs
mailing list