| 68 | // Simple bindings (used with the above): |
| 69 | template <typename T, int Adjust = 0, typename Holder = std::unique_ptr<T>, typename... Args> |
| 70 | py::class_<T, Holder> bind_local(Args &&...args) { |
| 71 | return py::class_<T, Holder>(std::forward<Args>(args)...) |
| 72 | .def(py::init<int>()) |
| 73 | .def("get", [](T &i) { return i.i + Adjust; }); |
| 74 | } |
| 75 | |
| 76 | // Simulate a foreign library base class (to match the example in the docs): |
| 77 | namespace pets { |
nothing calls this directly
no outgoing calls
no test coverage detected