| 148 | using namespace pybind11_tests::potentially_slicing_weak_ptr; |
| 149 | |
| 150 | TEST_SUBMODULE(potentially_slicing_weak_ptr, m) { |
| 151 | py::classh<VirtBaseSH, PyVirtBaseSH>(m, "VirtBaseSH") |
| 152 | .def(py::init<>()) |
| 153 | .def("get_code", &VirtBaseSH::get_code); |
| 154 | |
| 155 | py::class_<VirtBaseSP, std::shared_ptr<VirtBaseSP>, PyVirtBaseSP>(m, "VirtBaseSP") |
| 156 | .def(py::init<>()) |
| 157 | .def("get_code", &VirtBaseSP::get_code); |
| 158 | |
| 159 | wrap<VirtBaseSH>(m, |
| 160 | "SH_rtrn_obj_cast_shared_ptr", |
| 161 | "SH_rtrn_potentially_slicing_shared_ptr", |
| 162 | "SH_SpOwner", |
| 163 | "SH_WpOwner"); |
| 164 | |
| 165 | wrap<VirtBaseSP>(m, |
| 166 | "SP_rtrn_obj_cast_shared_ptr", |
| 167 | "SP_rtrn_potentially_slicing_shared_ptr", |
| 168 | "SP_SpOwner", |
| 169 | "SP_WpOwner"); |
| 170 | } |
nothing calls this directly
no outgoing calls
no test coverage detected