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

Function TEST_SUBMODULE

tests/test_class_sh_virtual_py_cpp_mix.cpp:49–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47using namespace pybind11_tests::class_sh_virtual_py_cpp_mix;
48
49TEST_SUBMODULE(class_sh_virtual_py_cpp_mix, m) {
50 py::classh<Base, BaseVirtualOverrider>(m, "Base").def(py::init<>()).def("get", &Base::get);
51
52 py::classh<CppDerivedPlain, Base>(m, "CppDerivedPlain").def(py::init<>());
53
54 py::classh<CppDerived, Base, CppDerivedVirtualOverrider>(m, "CppDerived").def(py::init<>());
55
56 m.def("get_from_cpp_plainc_ptr", get_from_cpp_plainc_ptr, py::arg("b"));
57 m.def("get_from_cpp_unique_ptr", get_from_cpp_unique_ptr, py::arg("b"));
58}

Callers

nothing calls this directly

Calls 1

argClass · 0.50

Tested by

no test coverage detected