This commit is contained in:
Wenzel Jakob 2016-05-30 11:45:02 +02:00
parent b569272127
commit 5eda97d7e4

View File

@ -163,7 +163,9 @@ pybind11::class_<std::vector<T, Allocator>, holder_type> bind_vector(pybind11::m
throw; 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"), arg("x"),
"Add an item to the end of the list"); "Add an item to the end of the list");