reverse range iterate

v1
Brett 2024-08-06 02:46:30 -04:00
parent 8535480ad5
commit f9938691ec
2 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.20) cmake_minimum_required(VERSION 3.20)
include(cmake/color.cmake) 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_TEST_VERSION 0.0.1)
set(BLT_TARGET BLT) set(BLT_TARGET BLT)

View File

@ -193,6 +193,12 @@ namespace blt
return itr::itr_container<Begin, End>{std::forward<Begin>(begin), std::forward<End>(end)}; return itr::itr_container<Begin, End>{std::forward<Begin>(begin), std::forward<End>(end)};
} }
template<typename Begin, typename End>
static inline auto reverse_iterate(Begin&& begin, End&& end)
{
return itr::itr_container<Begin, End>{std::reverse_iterator(std::forward<Begin>(begin)), std::reverse_iterator(std::forward<End>(end))};
}
template<typename T> template<typename T>
struct range struct range
{ {