fix(templates): fix TOptional's operator!= returned an wrong value for invalid value

This commit is contained in:
2022-03-15 11:52:46 +08:00
parent 48a344796a
commit f7b611febc
2 changed files with 2 additions and 1 deletions

View File

@ -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;
}