Skip to content

Commit 23c0d21

Browse files
committed
Fix merge error
1 parent 5d08e50 commit 23c0d21

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

include/phasar/PhasarLLVM/Utils/LatticeDomain.h

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -115,19 +115,18 @@ inline bool operator==(const LatticeDomain<L> &Lhs,
115115
template <
116116
typename L, typename LL,
117117
typename = std::void_t<decltype(std::declval<LL>() == std::declval<L>())>>
118-
inline bool operator==(const LatticeDomain<L> Lhs, const LL &Rhs) {
119-
return Rhs == Lhs;
118+
inline bool operator==(const LL &Lhs, const LatticeDomain<L> Rhs) {
119+
if (auto RVal = Rhs.getValueOrNull()) {
120+
return Lhs == *RVal;
121+
}
122+
return false;
120123
}
121124

122-
template <typename L, typename M>
123-
inline bool operator==(const L &Lhs, const M &Rhs) {
124-
if constexpr (is_variant_v<L> && !is_variant_v<M>) {
125-
return Lhs == std::variant<M>(Rhs);
126-
}
127-
if constexpr (!is_variant_v<L> && is_variant_v<M>) {
128-
return std::variant<L>(Lhs) == Rhs;
129-
}
130-
return Lhs == Rhs;
125+
template <
126+
typename L, typename LL,
127+
typename = std::void_t<decltype(std::declval<LL>() == std::declval<L>())>>
128+
inline bool operator==(const LatticeDomain<L> Lhs, const LL &Rhs) {
129+
return Rhs == Lhs;
131130
}
132131

133132
template <typename L>

0 commit comments

Comments
 (0)