fix(templates): fix TOptional's operator!= returned an wrong value for invalid value
This commit is contained in:
@ -223,7 +223,7 @@ template <typename T, typename U>
|
||||
constexpr bool operator!=(const TOptional<T>& LHS, const TOptional<U>& RHS)
|
||||
{
|
||||
if (LHS.IsValid() != RHS.IsValid()) return true;
|
||||
if (LHS.IsValid() == false) return true;
|
||||
if (LHS.IsValid() == false) return false;
|
||||
return *LHS != *RHS;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user