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

Function none4

tests/test_methods_and_attributes.cpp:131–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129int none2(NoneTester *obj) { return obj ? obj->answer : -1; }
130int none3(std::shared_ptr<NoneTester> &obj) { return obj ? obj->answer : -1; }
131int none4(std::shared_ptr<NoneTester> *obj) { return obj && *obj ? (*obj)->answer : -1; }
132int none5(const std::shared_ptr<NoneTester> &obj) { return obj ? obj->answer : -1; }
133
134// Issue #2778: implicit casting from None to object (not pointer)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected