diff --git a/tl/expected.hpp b/tl/expected.hpp index da0fd55..4f95a0f 100644 --- a/tl/expected.hpp +++ b/tl/expected.hpp @@ -1985,19 +1985,19 @@ constexpr bool operator!=(const U &v, const expected &x) { template constexpr bool operator==(const expected &x, const unexpected &e) { - return x.has_value() ? true : x.error() == e.value(); + return x.has_value() ? false : x.error() == e.value(); } template constexpr bool operator==(const unexpected &e, const expected &x) { - return x.has_value() ? true : x.error() == e.value(); + return x.has_value() ? false : x.error() == e.value(); } template constexpr bool operator!=(const expected &x, const unexpected &e) { - return x.has_value() ? false : x.error() != e.value(); + return x.has_value() ? true : x.error() != e.value(); } template constexpr bool operator!=(const unexpected &e, const expected &x) { - return x.has_value() ? false : x.error() != e.value(); + return x.has_value() ? true : x.error() != e.value(); } // TODO is_swappable