You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.
Probably, it would be enough to move implementation of fibonacci hashing from tests
That's a terrible idea from my (==user) point of view.
If you do, then please add a hash that enables lookups and insertions by std::string or std::string_view rather than implementing an incompatible one. So far this works as a cheap replacement:
@jan-konczak-cs-put right, pmem::obj::string and std::string with the same content should hash to the same value. For C++17 we can just implement std::hash<pmem::obj::string> as you did. The problem is only for older standards (there is no easy way to use existing std hash on a sequence of characters). But maybe, we don't have to provide it for older standards...
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
FEAT: Add std::hash<pmem::obj::string>
Rationale
It's needed to easily use pmem::obj::concurrent_hash_map with pmem::obj::string as a key.
API Changes
Add Default implementation of hasher for pmem::obj::string. Currently user have to provide custom one.
Implementation details
Probably, it would be enough to move implementation of fibonacci hashing from tests
libpmemobj-cpp/tests/concurrent_hash_map/concurrent_hash_map_string_test.hpp
Line 38 in 2df10e8
The text was updated successfully, but these errors were encountered: