diff --git a/BAN/include/BAN/Variant.h b/BAN/include/BAN/Variant.h index cdc9d0bbbb..d09617bb01 100644 --- a/BAN/include/BAN/Variant.h +++ b/BAN/include/BAN/Variant.h @@ -286,6 +286,16 @@ namespace BAN return **reinterpret_cast**>(m_storage); } + bool has_value() const + { + return m_index != invalid_index(); + } + + explicit operator bool() const + { + return has_value(); + } + void clear() { if (m_index != invalid_index())