From aaab9501789f2cdc85f9181865de732a1c78e203 Mon Sep 17 00:00:00 2001 From: FireWolf Date: Sun, 11 Sep 2022 20:27:45 -0700 Subject: [PATCH 1/2] FlatHashSet: Revise the default template parameters to fix the compiler errors reported by GCC 7. Signed-off-by: FireWolf --- runtime/Cpp/runtime/src/FlatHashSet.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/Cpp/runtime/src/FlatHashSet.h b/runtime/Cpp/runtime/src/FlatHashSet.h index 651612ab79..2ee6705e58 100644 --- a/runtime/Cpp/runtime/src/FlatHashSet.h +++ b/runtime/Cpp/runtime/src/FlatHashSet.h @@ -48,9 +48,9 @@ namespace antlr4 { using FlatHashSet = absl::flat_hash_set; #else template ::hasher, - typename Equal = typename std::unordered_set::key_equal, - typename Allocator = typename std::unordered_set::allocator_type> + typename Hash = std::hash, + typename Equal = std::equal_to, + typename Allocator = std::allocator> using FlatHashSet = std::unordered_set; #endif From 9d7741d3fb1e0befe1ca32502a42a2809741053c Mon Sep 17 00:00:00 2001 From: FireWolf Date: Sun, 11 Sep 2022 20:27:56 -0700 Subject: [PATCH 2/2] FlatHashMap: Revise the default template parameters to fix the compiler errors reported by GCC 7. Signed-off-by: FireWolf --- runtime/Cpp/runtime/src/FlatHashMap.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/Cpp/runtime/src/FlatHashMap.h b/runtime/Cpp/runtime/src/FlatHashMap.h index b9b9fd5f53..a935ad9c7f 100644 --- a/runtime/Cpp/runtime/src/FlatHashMap.h +++ b/runtime/Cpp/runtime/src/FlatHashMap.h @@ -48,9 +48,9 @@ namespace antlr4 { using FlatHashMap = absl::flat_hash_map; #else template ::hasher, - typename Equal = typename std::unordered_map::key_equal, - typename Allocator = typename std::unordered_map::allocator_type> + typename Hash = std::hash, + typename Equal = std::equal_to, + typename Allocator = std::allocator>> using FlatHashMap = std::unordered_map; #endif