| 36 | py::class_<A>(m_sub, "A").def(py::init<int>()).def("__repr__", &A::toString); |
| 37 | |
| 38 | class B { |
| 39 | public: |
| 40 | B() { print_default_created(this); } |
| 41 | ~B() { print_destroyed(this); } |
| 42 | B(const B &) { print_copy_created(this); } |
| 43 | B &operator=(const B ©) { |
| 44 | print_copy_assigned(this); |
| 45 | a1 = copy.a1; |
| 46 | a2 = copy.a2; |
| 47 | return *this; |
| 48 | } |
| 49 | A &get_a1() { return a1; } |
| 50 | A &get_a2() { return a2; } |
| 51 | |
| 52 | A a1{1}; |
| 53 | A a2{2}; |
| 54 | }; |
| 55 | py::class_<B>(m_sub, "B") |
| 56 | .def(py::init<>()) |
| 57 | .def("get_a1", |
nothing calls this directly
no test coverage detected