diff options
Diffstat (limited to 'AK/Variant.h')
-rw-r--r-- | AK/Variant.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/AK/Variant.h b/AK/Variant.h index f757e2a3ac..dae5cd7272 100644 --- a/AK/Variant.h +++ b/AK/Variant.h @@ -210,7 +210,11 @@ public: template<typename... NewTs> friend struct Variant; - Variant() = delete; + Variant() requires(!can_contain<Empty>()) = delete; + Variant() requires(can_contain<Empty>()) + : Variant(Empty()) + { + } #ifdef AK_HAS_CONDITIONALLY_TRIVIAL Variant(const Variant&) requires(!(IsCopyConstructible<Ts> && ...)) = delete; |