This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/51866] [c++0x][4.7 Regression] unordered_multiset compares moved-out values


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]