From 82a81c4c77f60a5fc93b21f7d6cdbcc68aa375be Mon Sep 17 00:00:00 2001 From: lisyarus Date: Thu, 9 Jun 2022 11:12:47 +0300 Subject: [PATCH] Add util::flat_list::begin/end --- libs/util/include/psemek/util/flat_list.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/util/include/psemek/util/flat_list.hpp b/libs/util/include/psemek/util/flat_list.hpp index 878fec9c..d17cef87 100644 --- a/libs/util/include/psemek/util/flat_list.hpp +++ b/libs/util/include/psemek/util/flat_list.hpp @@ -46,6 +46,12 @@ namespace psemek::util return reinterpret_cast(nodes_.get()); } + T * begin() { return data(); } + T const * begin() const { return data(); } + + T * end() { return begin() + capacity(); } + T const * end() const { return begin() + capacity(); } + void reserve(std::size_t size); void clear();