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

Function none5

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

Source from the content-addressed store, hash-verified

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)
135class NoneCastTester {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected