diff --git a/include/o3tl/enumarray.hxx b/include/o3tl/enumarray.hxx index 558ab158bffe..4fd5cab3155f 100644 --- a/include/o3tl/enumarray.hxx +++ b/include/o3tl/enumarray.hxx @@ -23,6 +23,7 @@ #include #include #include +#include #include namespace o3tl { @@ -92,10 +93,10 @@ public: const_iterator begin() const { return const_iterator(*this, 0); } const_iterator end() const { return const_iterator(*this, size()); } - V* data() { return detail_values; } + V* data() { return detail_values.data(); } private: - V detail_values[max_index + 1]; + std::array detail_values; };