Multiple inheritance support

This commit is contained in:
Wenzel Jakob
2016-09-11 20:00:40 +09:00
parent bad589a477
commit 8e5dceb6a6
15 changed files with 421 additions and 94 deletions

View File

@@ -61,7 +61,7 @@ test_initializer inheritance([](py::module &m) {
.def(py::init<std::string>());
/* Another way of declaring a subclass relationship: reference parent's C++ type */
py::class_<Rabbit>(m, "Rabbit", py::base<Pet>())
py::class_<Rabbit, Pet>(m, "Rabbit")
.def(py::init<std::string>());
/* And another: list parent in class template arguments */