From e73eb5eb4ca92d3c3b0ae93cdd3dc54410752733 Mon Sep 17 00:00:00 2001 From: Wai-Shing Luk Date: Wed, 15 Mar 2023 15:24:08 +0800 Subject: [PATCH] add operator++(int) for transranger --- CMakeLists.txt | 2 +- include/py2cpp/dict.hpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4301dbc..034e3e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ option(INSTALL_ONLY "Enable for installation only" OFF) # Note: update this to your new project's name and version project( Py2Cpp - VERSION 1.4 + VERSION 1.4.1 LANGUAGES CXX ) diff --git a/include/py2cpp/dict.hpp b/include/py2cpp/dict.hpp index 452ac09..e411828 100644 --- a/include/py2cpp/dict.hpp +++ b/include/py2cpp/dict.hpp @@ -18,6 +18,11 @@ template struct key_iterator : Iter { Iter::operator++(); return *this; } + auto operator++(int) -> key_iterator { + auto old = *this; + ++*this; + return old; + } }; /**