diff --git a/CMakeLists.txt b/CMakeLists.txt index bd8ff3d..daf03d8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.20) include(cmake/color.cmake) -set(BLT_VERSION 0.18.21) +set(BLT_VERSION 0.18.22) set(BLT_TEST_VERSION 0.0.1) set(BLT_TARGET BLT) diff --git a/include/blt/std/ranges.h b/include/blt/std/ranges.h index 08cd392..bbd54b5 100644 --- a/include/blt/std/ranges.h +++ b/include/blt/std/ranges.h @@ -164,13 +164,13 @@ namespace blt } template - static inline auto enumerate(const T(&container)[size]) + static inline auto enumerate(const T(& container)[size]) { return enumerator{&container[0], &container[size]}; } template - static inline auto enumerate(T(&container)[size]) + static inline auto enumerate(T(& container)[size]) { return enumerator{&container[0], &container[size]}; } @@ -193,6 +193,12 @@ namespace blt return itr::itr_container{std::forward(begin), std::forward(end)}; } + template + static inline auto reverse_iterate(Begin&& begin, End&& end) + { + return itr::itr_container{std::reverse_iterator(std::forward(begin)), std::reverse_iterator(std::forward(end))}; + } + template struct range {