diff --git a/include/pybind11/stl.h b/include/pybind11/stl.h index 5153fec9..231c8084 100644 --- a/include/pybind11/stl.h +++ b/include/pybind11/stl.h @@ -77,7 +77,7 @@ public: pybind11::set s; for (auto const &value: src) { object value_ = object(key_conv::cast(value, policy, parent), false); - if (!value_ || !s.add(value)) + if (!value_ || !s.add(value_)) return handle(); } return s.release();