From a768eb04079b2360481494dec2348a1045a5c978 Mon Sep 17 00:00:00 2001 From: Johannes Kalmbach Date: Tue, 16 Apr 2024 16:49:40 +0200 Subject: [PATCH] Try to fix the MacOS build --- src/engine/TransitivePathBase.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/engine/TransitivePathBase.h b/src/engine/TransitivePathBase.h index a16a37ee50..b0308dd923 100644 --- a/src/engine/TransitivePathBase.h +++ b/src/engine/TransitivePathBase.h @@ -59,13 +59,16 @@ struct TransitivePathSide { // We deliberately use the `std::` variants of a hash set and hash map because // `absl`s types are not exception safe. -inline constexpr auto hash = [](Id id) { - return std::hash{}(id.getBits()); +struct HashId { + auto operator()(Id id) const { + return std::hash{}(id.getBits()); + } }; -using Set = std::unordered_set, + +using Set = std::unordered_set, ad_utility::AllocatorWithLimit>; using Map = std::unordered_map< - Id, Set, decltype(hash), std::equal_to, + Id, Set, HashId, std::equal_to, ad_utility::AllocatorWithLimit>>; /**