diff --git a/BAN/include/BAN/Variant.h b/BAN/include/BAN/Variant.h index 71b2107db1..cdc9d0bbbb 100644 --- a/BAN/include/BAN/Variant.h +++ b/BAN/include/BAN/Variant.h @@ -216,6 +216,14 @@ namespace BAN return m_index == detail::index(); } + template + void emplace(Args&&... args) requires (can_have()) + { + clear(); + m_index = detail::index(); + new (m_storage) T(BAN::forward(args)...); + } + template void set(T&& value) requires (can_have() && !is_lvalue_reference_v) {