[Patch] Move hash_bytes.cc to libsupc++, add type_info::hash_code

Paolo Carlini paolo.carlini@oracle.com
Tue Sep 21 23:52:00 GMT 2010


Hi,

in order to implement type_info::hash_code for C++0x (and then, in a
straightforward way, <typeindex>), _Hash_bytes has to be made available
to libsupc++, but since we don't want to have libsupc++ depending on
libstdc++ facilities, the only option seems moving hash_bytes.cc itself
to libsupc++. I did this with the below and everything seems ok (tested
x86_64-linux multilib). I'm only a bit nervous about the correctness and
performance of hash_code vs the various definitions of
type_info::operator==, but I think the below, rather simple, should be
fine, in particular should be always true that type_infos comparing
equal hash equal. Please review it. I mean to apply (and move to
<typeindex>) in one day or so.

Thanks,
Paolo.

/////////////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_type_info_hash_code
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20100921/c8187975/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_type_info_hash_code
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20100921/c8187975/attachment-0001.ksh>


More information about the Libstdc++ mailing list