Searched refs:SharedFromThisRef (Results 1 – 2 of 2) sorted by relevance
/external/python/pybind11/tests/ |
D | test_smart_ptr.cpp | 283 struct SharedFromThisRef { in TEST_SUBMODULE() struct 294 using B = SharedFromThisRef::B; in TEST_SUBMODULE() 296 py::class_<SharedFromThisRef>(m, "SharedFromThisRef") in TEST_SUBMODULE() 298 .def_readonly("bad_wp", &SharedFromThisRef::value) in TEST_SUBMODULE() 299 … .def_property_readonly("ref", [](const SharedFromThisRef &s) -> const B & { return *s.shared; }) in TEST_SUBMODULE() 300 .def_property_readonly("copy", [](const SharedFromThisRef &s) { return s.value; }, in TEST_SUBMODULE() 302 .def_readonly("holder_ref", &SharedFromThisRef::shared) in TEST_SUBMODULE() 303 .def_property_readonly("holder_copy", [](const SharedFromThisRef &s) { return s.shared; }, in TEST_SUBMODULE() 305 .def("set_ref", [](SharedFromThisRef &, const B &) { return true; }) in TEST_SUBMODULE() argument 306 .def("set_holder", [](SharedFromThisRef &, std::shared_ptr<B>) { return true; }); in TEST_SUBMODULE() argument
|
D | test_smart_ptr.py | 201 s = m.SharedFromThisRef()
|