Skip to content

Commit

Permalink
Try to fix the MacOS build
Browse files Browse the repository at this point in the history
  • Loading branch information
joka921 authored Apr 16, 2024
1 parent 9d6eaf3 commit a768eb0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/engine/TransitivePathBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint64_t>{}(id.getBits());
struct HashId {
auto operator()(Id id) const {
return std::hash<uint64_t>{}(id.getBits());
}
};
using Set = std::unordered_set<Id, decltype(hash), std::equal_to<Id>,

using Set = std::unordered_set<Id, HashId, std::equal_to<Id>,
ad_utility::AllocatorWithLimit<Id>>;
using Map = std::unordered_map<
Id, Set, decltype(hash), std::equal_to<Id>,
Id, Set, HashId, std::equal_to<Id>,
ad_utility::AllocatorWithLimit<std::pair<const Id, Set>>>;

/**
Expand Down

0 comments on commit a768eb0

Please sign in to comment.