test_reference_internal
| 19 | |
| 20 | // test_reference_internal |
| 21 | class A { |
| 22 | public: |
| 23 | explicit A(int v) : v(v) { print_created(this, v); } |
| 24 | ~A() { print_destroyed(this); } |
| 25 | A(const A &) { print_copy_created(this); } |
| 26 | A &operator=(const A ©) { |
| 27 | print_copy_assigned(this); |
| 28 | v = copy.v; |
| 29 | return *this; |
| 30 | } |
| 31 | std::string toString() const { return "A[" + std::to_string(v) + "]"; } |
| 32 | |
| 33 | private: |
| 34 | int v; |
| 35 | }; |
| 36 | py::class_<A>(m_sub, "A").def(py::init<int>()).def("__repr__", &A::toString); |
| 37 | |
| 38 | class B { |
nothing calls this directly
no test coverage detected