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); } };