From 5e654166848d9a4bb06f93332e5997fc16d9388e Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 2 Jul 2024 13:13:13 -0400 Subject: [PATCH] patch ranges --- CMakeLists.txt | 2 +- include/blt/std/ranges.h | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fbb076c..869a1a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.20) include(cmake/color.cmake) -set(BLT_VERSION 0.17.28) +set(BLT_VERSION 0.17.29) 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 5c48d87..9e6b26d 100644 --- a/include/blt/std/ranges.h +++ b/include/blt/std/ranges.h @@ -19,25 +19,26 @@ namespace blt { namespace itr { - template + template class itr_container { public: - itr_container(ITER&& begin, ITER&& end): begin_(std::forward(begin)), end_(std::forward(end)) + itr_container(Begin&& begin, End&& end): begin_(std::forward(begin)), end_(std::forward(end)) {} - ITER begin() + Begin begin() { return begin_; } - ITER end() + End end() { return end_; } private: - ITER begin_, end_; + Begin begin_; + End end_; }; template> @@ -174,10 +175,10 @@ namespace blt return enumerator{container.begin(), container.end()}; } - template - static inline auto enumerate(ITER&& begin, ITER&& end) + template + static inline auto enumerate(Begin&& begin, End&& end) { - return itr::itr_container{std::forward(begin), std::forward(end)}; + return itr::itr_container{std::forward(begin), std::forward(end)}; } template