This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

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.


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