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

Fix compilation error for case when we use std::unordered_map #551

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

UnickSoft
Copy link

Hello.
I had compilation error if I used std::unordered_map inside bootstrap::standard_library::map_type. Like this:
bootstrap::standard_library::map_type<std::unordered_map<std::string, int>>("StringInt_Map")
I faced with this problem with g++ and under Mac. My fix is just a hack, but I hope you fix my case in future release.
And this fix should work for C++17.

Issue this pull request references: #

Changes proposed in this pull request

…map_type for g++ or Mac. Fix should work for C++17. For example: bootstrap::standard_library::map_type<std::unordered_map<std::string, int>>("StringInt_Map")
@totalgee
Copy link
Contributor

totalgee commented May 6, 2021

This doesn't really make sense do "hack" around, because unordered_map's iterator really is only a forward iterator, not bidirectional (whereas std::map's iterator is bidirectional). Mightn't the better solution be to create a new bootstrap::standard_library::unordered_map_type? I don't know...

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.

None yet

2 participants