From cca7d3aef7e97228bddc04601e5c6f1d03894be9 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 23 Jul 2020 19:55:25 +0200 Subject: [PATCH] possible fix --- common/pycontainers.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/common/pycontainers.h b/common/pycontainers.h index 15e502d1..0a5092a3 100644 --- a/common/pycontainers.h +++ b/common/pycontainers.h @@ -249,7 +249,7 @@ template struct map_pair_wrapper struct pair_iterator_wrapper { - static py::object next(std::pair &iter) + static py::object next(std::pair &&iter) { if (iter.second == 0) { iter.second++; @@ -266,8 +266,7 @@ template struct map_pair_wrapper static void wrap(py::module &m, const char *python_name) { - //FIXME - //py::class_>(m, python_name).def("__next__", next); + py::class_>(m, python_name).def("__next__", next); } }; @@ -373,7 +372,7 @@ template struct map_pair_wrapper_uptr struct pair_iterator_wrapper { - static py::object next(std::pair &iter) + static py::object next(std::pair &&iter) { if (iter.second == 0) { iter.second++; @@ -390,8 +389,7 @@ template struct map_pair_wrapper_uptr static void wrap(py::module &m, const char *python_name) { - //FIXME - //py::class_>(m, python_name).def("__next__", next); + py::class_>(m, python_name).def("__next__", next); } };