MCPcopy Create free account
hub / github.com/pybind/pybind11 / TEST_SUBMODULE

Function TEST_SUBMODULE

tests/test_class_sh_disowning.cpp:29–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27} // namespace pybind11_tests
28
29TEST_SUBMODULE(class_sh_disowning, m) {
30 using namespace pybind11_tests::class_sh_disowning;
31
32 py::classh<Atype<1>>(m, "Atype1").def(py::init<int>()).def("get", &Atype<1>::get);
33 py::classh<Atype<2>>(m, "Atype2").def(py::init<int>()).def("get", &Atype<2>::get);
34
35 m.def("same_twice", same_twice);
36
37 m.def("mixed", mixed);
38
39 m.def("overloaded", (int (*)(std::unique_ptr<Atype<1>>, int)) &overloaded);
40 m.def("overloaded", (int (*)(std::unique_ptr<Atype<2>>, int)) &overloaded);
41}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected