This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: type_info::hash_code()
On Sat, Jan 5, 2013 at 7:35 AM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> I've just noticed that std::type_info::hash_code() uses _Hash_bytes,
> which as the comment in libsupc++/hash_bytes.h says is not guaranteed
> to stay the same from release to release, and we might want to change
> the implementation of _Hash_bytes for PR 55815.
>
> Since changing type_info::hash_code() would effectively be an ABI
> change (it would break the requirement that typeid(T).hash_code() in
> separate objects/libraries returns the same value for the same T) I
> think we should rename the current _Hash_bytes code to
> _Murmur_hash_bytes and use that in type_info::hash_code. Then we can
> make _Hash_bytes simply forward to another function, which would be
> _Murmur_hash_bytes for now, but could use siphash or something else in
> future.
That looks fine to me. Benjamin?
-- Gaby