diff --git a/AK/Optional.h b/AK/Optional.h index 174232f4a12..97aa5523aff 100644 --- a/AK/Optional.h +++ b/AK/Optional.h @@ -570,6 +570,12 @@ ALWAYS_INLINE bool operator==(Optional const& first, T2 const& second) return first.has_value() && first.value() == second; } +template +ALWAYS_INLINE bool operator==(Optional const& first, OptionalNone) +{ + return !first.has_value(); +} + } #if USING_AK_GLOBALLY