mirror of
https://github.com/pybind/pybind11.git
synced 2025-02-16 21:57:55 +00:00
example12 clarifications
This commit is contained in:
parent
f64ff575d7
commit
43b09af3a9
@ -89,6 +89,8 @@ void init_ex12(py::module &m) {
|
||||
/* Declare that 'PyExample12' is really an alias for the original type 'Example12' */
|
||||
.alias<Example12>()
|
||||
.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 */
|
||||
.def("run", &Example12::run)
|
||||
.def("run_bool", &Example12::run_bool)
|
||||
|
Loading…
Reference in New Issue
Block a user