Make hash_combine accept a configurable hash function
Summary: std::hash is not awesome and not configurable. Typical cases you might want to customize are: string: I happen to know that fnv isn't super awesome, for example, and that's what folly uses for std::hash fbstring. pointers: you may want to hash the contents of the pointer instead of the address for certain types. This is a very simple diff that lets you do that. It provides StdHasher that passes through to std::hash and uses that for hash_combine, so this should be 100% backward compatible. Test Plan: test_hash. I will add another test for using a hasher besides StdHasher shortly. Reviewed By: delong.j@fb.com FB internal diff: D733899
Showing
Please register or sign in to comment