Fix bug in unequal operator with void as expected value (#156)
This commit is contained in:
1 parent
735634d78b
commit
a0ef772cbe
1 file changed
+1
-1
@@ -2392,7 +2392,7 @@ constexpr bool operator!=(const expected<void, E> &lhs,
|
||||
const expected<void, F> &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 <class T, class E, class U>
|
||||
|
||||
Reference in new issue
Block a user