Skip to content

Commit 5d08e50

Browse files
committed
not quite
1 parent e5c5c69 commit 5d08e50

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

include/phasar/PhasarLLVM/Utils/LatticeDomain.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ struct LatticeDomain : public std::variant<Top, L, Bottom> {
6666
}
6767
};
6868

69-
// template <typename L> using LatticeDomain = std::variant<L, Top, Bottom>;
70-
7169
template <typename L,
7270
typename = std::void_t<decltype(std::declval<std::ostream &>()
7371
<< std::declval<L>())>>
@@ -123,10 +121,10 @@ inline bool operator==(const LatticeDomain<L> Lhs, const LL &Rhs) {
123121

124122
template <typename L, typename M>
125123
inline bool operator==(const L &Lhs, const M &Rhs) {
126-
if constexpr (is_variant_v<L>) {
124+
if constexpr (is_variant_v<L> && !is_variant_v<M>) {
127125
return Lhs == std::variant<M>(Rhs);
128126
}
129-
if constexpr (is_variant_v<M>) {
127+
if constexpr (!is_variant_v<L> && is_variant_v<M>) {
130128
return std::variant<L>(Lhs) == Rhs;
131129
}
132130
return Lhs == Rhs;

0 commit comments

Comments
 (0)