Commit 43b09af3 by Wenzel Jakob

example12 clarifications

parent f64ff575
...@@ -89,6 +89,8 @@ void init_ex12(py::module &m) { ...@@ -89,6 +89,8 @@ void init_ex12(py::module &m) {
/* Declare that 'PyExample12' is really an alias for the original type 'Example12' */ /* Declare that 'PyExample12' is really an alias for the original type 'Example12' */
.alias<Example12>() .alias<Example12>()
.def(py::init<int>()) .def(py::init<int>())
/* Copy constructor (not needed in this case, but should generally be declared in this way) */
.def(py::init<const PyExample12 &>())
/* Reference original class in function definitions */ /* Reference original class in function definitions */
.def("run", &Example12::run) .def("run", &Example12::run)
.def("run_bool", &Example12::run_bool) .def("run_bool", &Example12::run_bool)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment