AK: Allow testing Empty instances for equality

This also makes it possible to compare `Variant<Empty, Ts...>`
objects if operator== exists for all Ts
This commit is contained in:
Shannon Booth 2023-07-27 22:14:56 +12:00 committed by Ali Mohammad Pur
commit bf7af25a82
Notes: sideshowbarker 2024-07-16 23:34:49 +09:00
2 changed files with 30 additions and 0 deletions

View file

@ -217,6 +217,7 @@ using MergeAndDeduplicatePacks = InheritFromPacks<MakeIndexSequence<sizeof...(Ps
namespace AK {
struct Empty {
constexpr bool operator==(Empty const&) const = default;
};
template<typename T>