Comments (8)
I added support for this feature in a new branch 75ad4e0. Since it requires compiling with C++14, while everything else compiles with C++11, I haven't yet bothered to incorporate the unit test into the build system, which I want to do before merging into master. Until then, though, would you mind trying this branch out and seeing if it works for your purposes?
from libcuckoo.
Merged into master.
from libcuckoo.
Thanks Manu. It might be a little while before I can test this. :(
Is the only reason you need C++14 because you're using std::equal_to in your test program? I guess I'll find out when I try it, but I'm looking to use this in a C++11 project. Hopefully that's just a matter of defining an appropriate functor, not something I need new language features for.
from libcuckoo.
Yeah I'm using std::equal_to, but with a void overload that was added in c++14 and not supported in c++11. The document you linked me explains how that works. Not sure if it's possible to implement such a comparator in c++11 because the void overload is not supported I think.
from libcuckoo.
I'm hoping I can get away with having a non-template function object which just has the necessary overloads of operator()(). If my hashtable has keys of type std::string, as long as my Pred functor has an overload for operator()(const std::string &, const char *) (and maybe vice-versa), it looks like it should work. But I haven't tried it yet.
from libcuckoo.
Oh yeah that could work. That's what I'm doing for the hash function in the test, so maybe I can change that for the comparator too.
from libcuckoo.
I just pushed an update that removes the c++14 dependency, using an overloaded class instead of std::equal_to<>.
from libcuckoo.
Sorry it took so long for me to test this. It appears to do exactly what I want, and works fine in C++11 mode.
Thanks!
from libcuckoo.
Related Issues (20)
- cuckoohashmap taking high memory HOT 4
- Warnings and and test failure in test_resize on x86 Linux HOT 6
- add cursor without table lock?
- 32-bit unit_tests errors and compiler warnings HOT 3
- Strange behavior of tests for different architectures HOT 6
- valgrind reports Invalid free() / delete / delete[] / realloc() during map destructor HOT 11
- High spinlock overhead HOT 4
- Segfault in bucket_container copy constructor HOT 3
- terminated with exception libcuckoo::load_factor_too_low HOT 2
- find_fn vs. update_fn HOT 2
- Horrible scalability of my experiment HOT 1
- Why does `insert_or_assign` require the value to be CopyAssignable? HOT 1
- simple question about update_fn HOT 1
- How to integrate xxHash? HOT 1
- Segmentation fault on inserts HOT 3
- Missing keys HOT 3
- High contention under many reader threads on hot keys HOT 4
- Bundled Catch library fails to compile with recent C++ HOT 3
- .clear() taking too long HOT 1
- parallel-for over concurrent hash map HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libcuckoo.