Replace deprecated __gnu_cxx::hash_map with std::unordered_map#33
Open
jamesjer wants to merge 1 commit intocvc5:masterfrom
Open
Replace deprecated __gnu_cxx::hash_map with std::unordered_map#33jamesjer wants to merge 1 commit intocvc5:masterfrom
jamesjer wants to merge 1 commit intocvc5:masterfrom
Conversation
4tXJ7f
suggested changes
Mar 9, 2020
Member
4tXJ7f
left a comment
There was a problem hiding this comment.
Thank you for your contribution. I have some minor requests.
| endif() | ||
|
|
||
| add_cxx_flag("-Wall") | ||
| add_cxx_flag("-Wno-deprecated") |
Member
There was a problem hiding this comment.
I'd rather keep -Wno-deprecated to prevent people from re-introducing deprecated functions/classes.
| #include <hash_map> | ||
| #else | ||
| #include <ext/hash_map> | ||
| #include <unordered_map> |
Member
There was a problem hiding this comment.
Eliminate _MSC_VER case (hash_map is deprecated).
| typedef __gnu_cxx::hash_map<std::string, SymExpr *> symmap2; | ||
| typedef std::unordered_map<std::string, Expr *> symmap; | ||
| typedef std::unordered_map<std::string, SymExpr *> symmap2; | ||
| #endif |
Member
|
Also, since you are an external contributor, it would be great if you could sign the commit as outlined here to indicate that the DCO applies to your contribution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Additionally remove -Wno-deprecated, since hash_map is the only deprecated interface currently in use. Note that std::unordered_map is part of the C++11 standard, and CMakeLists.txt already requires a C++11 compiler.