This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51866] [c++0x][4.7 Regression] unordered_multiset compares moved-out values
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 16 Jan 2012 12:38:56 +0000
- Subject: [Bug libstdc++/51866] [c++0x][4.7 Regression] unordered_multiset compares moved-out values
- Auto-submitted: auto-generated
- References: <bug-51866-4@http.gcc.gnu.org/bugzilla/>
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)