Skip to content

Commit

Permalink
Merge pull request #3885 from 0xFireWolf/master
Browse files Browse the repository at this point in the history
[C++] Fix the compiler errors reported by GCC 7
  • Loading branch information
parrt authored Nov 19, 2022
2 parents aa1f1f1 + 9d7741d commit 249dc8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions runtime/Cpp/runtime/src/FlatHashMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ namespace antlr4 {
using FlatHashMap = absl::flat_hash_map<Key, Value, Hash, Equal, Allocator>;
#else
template <typename Key, typename Value,
typename Hash = typename std::unordered_map<Key, Value>::hasher,
typename Equal = typename std::unordered_map<Key, Value>::key_equal,
typename Allocator = typename std::unordered_map<Key, Value>::allocator_type>
typename Hash = std::hash<Key>,
typename Equal = std::equal_to<Key>,
typename Allocator = std::allocator<std::pair<const Key, Value>>>
using FlatHashMap = std::unordered_map<Key, Value, Hash, Equal, Allocator>;
#endif

Expand Down
6 changes: 3 additions & 3 deletions runtime/Cpp/runtime/src/FlatHashSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ namespace antlr4 {
using FlatHashSet = absl::flat_hash_set<Key, Hash, Equal, Allocator>;
#else
template <typename Key,
typename Hash = typename std::unordered_set<Key>::hasher,
typename Equal = typename std::unordered_set<Key>::key_equal,
typename Allocator = typename std::unordered_set<Key>::allocator_type>
typename Hash = std::hash<Key>,
typename Equal = std::equal_to<Key>,
typename Allocator = std::allocator<Key>>
using FlatHashSet = std::unordered_set<Key, Hash, Equal, Allocator>;
#endif

Expand Down

0 comments on commit 249dc8f

Please sign in to comment.