File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -81,10 +81,10 @@ <h2><a name="implicit_conversion">Reflecting C++ Inheritance Relationships</a></
8181 python::module_builder my_module("my_module");
8282
8383 python::class_builder<Base> base_class(my_module, "Base");
84- base_class.def(python::constructor<void >());
84+ base_class.def(python::constructor<>());
8585
8686 python::class_builder<Derived> derived_class(my_module, "Derived");
87- derived_class.def(python::constructor<void >());
87+ derived_class.def(python::constructor<>());
8888 < b > // Establish the inheritance relationship between Base and Derived
8989 derived_class.declare_base(base_class);</ b >
9090
@@ -137,10 +137,10 @@ <h2>Inheritance Without Virtual Functions</h2>
137137< hr >
138138 ...
139139 python::class_builder<Base> base2_class(my_module, "Base2");
140- base2_class.def(python::constructor<void >());
140+ base2_class.def(python::constructor<>());
141141
142142 python::class_builder<Derived2> derived2_class(my_module, "Derived2");
143- derived2_class.def(python::constructor<void >());
143+ derived2_class.def(python::constructor<>());
144144 derived_class.declare_base(base_class, < b > python::without_downcast</ b > );
145145</ pre >
146146</ blockquote >
You can’t perform that action at this time.
0 commit comments