diff --git a/Source/Core/Common/SmallVector.h b/Source/Core/Common/SmallVector.h index c7018f4741..df50b0c115 100644 --- a/Source/Core/Common/SmallVector.h +++ b/Source/Core/Common/SmallVector.h @@ -4,6 +4,7 @@ #include #include +#include #include namespace Common @@ -13,6 +14,8 @@ namespace Common template class SmallVector final { + static_assert(std::is_standard_layout_v == true, "Type must be a standard layout type"); + public: SmallVector() = default; explicit SmallVector(size_t size) : m_size(size) {} @@ -40,6 +43,8 @@ public: size_t size() const { return m_size; } bool empty() const { return m_size == 0; } + void clear() { m_size = 0; } + private: std::array m_array{}; size_t m_size = 0;