Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing end(size_t n) form of iterator? #13

Open
madscientist opened this issue Jun 3, 2018 · 1 comment
Open

Missing end(size_t n) form of iterator? #13

madscientist opened this issue Jun 3, 2018 · 1 comment

Comments

@madscientist
Copy link

I made a quick attempt to add this into my codebase as a drop-in replacement for std::unordered_map. Mostly it worked fine but there were a few errors. I haven't tracked them all down, but one of them is:

         for (TableMap::local_iterator it = tables.begin(bucket); it != tables.end(bucket); it++) {
              ^~~~~~~~
 ...
     const_iterator end() const
                    ^~~
ska/bytell_hash_map.hpp:402:20: note:   candidate expects 0 arguments, 1 provided

It's trying to use this form of end() from http://www.cplusplus.com/reference/unordered_map/unordered_map/end/

local_iterator end (size_type n);
const_local_iterator end (size_type n) const;

Thanks!

@cebtenzzre
Copy link

Based on the description of unordered_map's bucket interface on cppreference, it looks bucket_size and the related form of begin() also need to be implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants