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

Method clone_shared_ptr

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

Source from the content-addressed store, hash-verified

129 return new Tiger(*this); // upcast
130 }
131 std::shared_ptr<Animal> clone_shared_ptr() const override {
132 return std::make_shared<Tiger>(*this); // upcast
133 }
134 std::unique_ptr<Animal> clone_unique_ptr() const override {
135 return std::unique_ptr<Tiger>(new Tiger(*this)); // upcast
136 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected