diff --git a/include/pybind11/stl_bind.h b/include/pybind11/stl_bind.h index a6b50719..a67f3ca0 100644 --- a/include/pybind11/stl_bind.h +++ b/include/pybind11/stl_bind.h @@ -163,7 +163,9 @@ pybind11::class_, holder_type> bind_vector(pybind11::m throw; } }); - cl.def("append", (void (Vector::*) (const T &)) & Vector::push_back, + + cl.def("append", + [](Vector &v, const T &value) { v.push_back(value); }, arg("x"), "Add an item to the end of the list");