BAN: Default initialize optional storage
This removes maybe uninitialized warning when using default initialized optionals.
This commit is contained in:
parent
1337758660
commit
fd8dc03ae9
|
@ -44,7 +44,7 @@ namespace BAN
|
|||
constexpr void clear();
|
||||
|
||||
private:
|
||||
alignas(T) uint8_t m_storage[sizeof(T)];
|
||||
alignas(T) uint8_t m_storage[sizeof(T)] {};
|
||||
bool m_has_value { false };
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue