forked from TartanLlama/expected
Fix bug in unequal operator with void as expected value (#156)
This commit is contained in:
@@ -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