o3tl: use std::array as the container for enumarray

Change-Id: I482140a14a4f18014d89ed5b8ce7c3ca9447b8d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137465
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This commit is contained in:
Tomaž Vajngerl 2022-07-25 15:32:52 +02:00 committed by Tomaž Vajngerl
parent ecef3edbcd
commit b9d360405a

View file

@ -23,6 +23,7 @@
#include <iterator>
#include <type_traits>
#include <utility>
#include <array>
#include <cassert>
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<V, max_index + 1> detail_values;
};