Skip to content

Conversation

@ITHelpDec
Copy link

@ITHelpDec ITHelpDec commented May 27, 2023

Consider changing...

for(bucket_iterator it=buckets[i].data.begin();

...to...
for(auto it=buckets[i].data.begin();

typedef bucket_iterator does not exist in the scope of our map class, but of the sub-class bucket_type.

We must declare .get_map() as a friend within bucket_type to allow access to its private members.

// ...
private:
    class bucket_type {
        friend std::map<K, V> ts::map<K, V>::get_map() const;
    public:
// ...

- `bucket_iterator` typedef does not exist in scope of our map class, but of the sub-class `bucket_type`
- must declare `.get_map()` as a friend within `bucket_type` to allow access to private members
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

Successfully merging this pull request may close these issues.

1 participant