Skip to content

Commit

Permalink
Add hash function for IntervalDomain
Browse files Browse the repository at this point in the history
Summary: Move hash function for IntervalDomain from MT to sparta since it appears quite re-usable.

Reviewed By: arnaudvenet

Differential Revision: D48239105

fbshipit-source-id: 2bff16f61d839aa1fc4cf71b3574a8c3c95feb2e
  • Loading branch information
Yuh Shin Ong authored and facebook-github-bot committed Aug 11, 2023
1 parent 13f839d commit 1765fe6
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions source/ClassIntervals.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,3 @@ class ClassIntervals final {
};

} // namespace marianatrench

template <>
struct std::hash<marianatrench::ClassIntervals::Interval> {
std::size_t operator()(
const marianatrench::ClassIntervals::Interval& interval) const {
std::size_t seed = 0;
boost::hash_combine(seed, interval.lower_bound());
boost::hash_combine(seed, interval.upper_bound());
return seed;
}
};

0 comments on commit 1765fe6

Please sign in to comment.