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

Function none2

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

Source from the content-addressed store, hash-verified

127};
128int none1(const NoneTester &obj) { return obj.answer; }
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; }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected