Skip to content

Commit

Permalink
possible fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mmicko committed Jul 23, 2020
1 parent 6bb457b commit cca7d3a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions common/pycontainers.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ template <typename T1, typename T2, typename value_conv> struct map_pair_wrapper

struct pair_iterator_wrapper
{
static py::object next(std::pair<wrapped_pair &, int> &iter)
static py::object next(std::pair<wrapped_pair &, int> &&iter)
{
if (iter.second == 0) {
iter.second++;
Expand All @@ -266,8 +266,7 @@ template <typename T1, typename T2, typename value_conv> struct map_pair_wrapper

static void wrap(py::module &m, const char *python_name)
{
//FIXME
//py::class_<std::pair<wrapped_pair &, int>>(m, python_name).def("__next__", next);
py::class_<std::pair<wrapped_pair &, int>>(m, python_name).def("__next__", next);
}
};

Expand Down Expand Up @@ -373,7 +372,7 @@ template <typename T1, typename T2> struct map_pair_wrapper_uptr

struct pair_iterator_wrapper
{
static py::object next(std::pair<wrapped_pair &, int> &iter)
static py::object next(std::pair<wrapped_pair &, int> &&iter)
{
if (iter.second == 0) {
iter.second++;
Expand All @@ -390,8 +389,7 @@ template <typename T1, typename T2> struct map_pair_wrapper_uptr

static void wrap(py::module &m, const char *python_name)
{
//FIXME
//py::class_<std::pair<wrapped_pair &, int>>(m, python_name).def("__next__", next);
py::class_<std::pair<wrapped_pair &, int>>(m, python_name).def("__next__", next);
}
};

Expand Down

0 comments on commit cca7d3a

Please sign in to comment.