This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
type_info::hash_code()
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: "libstdc++" <libstdc++ at gcc dot gnu dot org>
- Date: Sat, 5 Jan 2013 13:35:27 +0000
- Subject: type_info::hash_code()
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.