File tree Expand file tree Collapse file tree
include/phasar/PhasarLLVM/Utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,19 +115,18 @@ inline bool operator==(const LatticeDomain<L> &Lhs,
115115template <
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
133132template <typename L>
You can’t perform that action at this time.
0 commit comments