From 369ab664b6faff15c7b4a7fa73723722e21ec56e Mon Sep 17 00:00:00 2001 From: Brett Laptop Date: Thu, 26 Sep 2024 13:51:07 -0400 Subject: [PATCH] iterator! --- CMakeLists.txt | 2 +- include/blt/std/iterator.h | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 997dcec..44a26ae 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.21.2) +set(BLT_VERSION 0.21.3) set(BLT_TEST_VERSION 0.0.1) set(BLT_TARGET BLT) diff --git a/include/blt/std/iterator.h b/include/blt/std/iterator.h index 79c1411..2cd2e63 100644 --- a/include/blt/std/iterator.h +++ b/include/blt/std/iterator.h @@ -50,18 +50,18 @@ namespace blt }; template - class pair_iterator_base + class dual_iterator_base { public: - explicit pair_iterator_base(Iter1 iter1, Iter2 iter2): m_iter1(std::move(iter1)), m_iter2(std::move(iter2)) + explicit dual_iterator_base(Iter1 iter1, Iter2 iter2): m_iter1(std::move(iter1)), m_iter2(std::move(iter2)) {} - friend bool operator==(const pair_iterator_base& a, const pair_iterator_base& b) + friend bool operator==(const dual_iterator_base& a, const dual_iterator_base& b) { return a.m_iter1 == b.m_iter1; } - friend bool operator!=(const pair_iterator_base& a, const pair_iterator_base& b) + friend bool operator!=(const dual_iterator_base& a, const dual_iterator_base& b) { return a.m_iter1 != b.m_iter1; } @@ -82,11 +82,11 @@ namespace blt }; template - class enumerate_iterator_base : public pair_iterator_base + class enumerate_iterator_base : public dual_iterator_base { public: explicit enumerate_iterator_base(Iter iter, blt::size_t place = 0): - pair_iterator_base(std::move(iter), place) + dual_iterator_base(std::move(iter), place) {} enumerate_item> operator*() const