From a0ef772cbe7096115886294ca36b2fe70ac30e14 Mon Sep 17 00:00:00 2001 From: Bojan Strbac <150679584+bojanstrbac@users.noreply.github.com> Date: Tue, 21 Jan 2025 10:47:24 +0100 Subject: [PATCH] Fix bug in unequal operator with void as expected value (#156) --- include/tl/expected.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tl/expected.hpp b/include/tl/expected.hpp index afee404..52bef2c 100644 --- a/include/tl/expected.hpp +++ b/include/tl/expected.hpp @@ -2392,7 +2392,7 @@ constexpr bool operator!=(const expected &lhs, const expected &rhs) { return (lhs.has_value() != rhs.has_value()) ? true - : (!lhs.has_value() ? lhs.error() == rhs.error() : false); + : (!lhs.has_value() ? lhs.error() != rhs.error() : false); } template