diff --git a/include/pybind11/stl.h b/include/pybind11/stl.h index 63e7fdc43..aa792e778 100644 --- a/include/pybind11/stl.h +++ b/include/pybind11/stl.h @@ -110,7 +110,8 @@ public: while (PyDict_Next(src, &pos, &key_, &value_)) { if (!kconv.load(key_, convert) || !vconv.load(value_, convert)) return false; - value[kconv] = vconv; + Value & _v = vconv; + value[kconv] = _v; } return true; }