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

Method New

tests/test_class_sh_unique_ptr_custom_deleter.cpp:15–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13 std::string name;
14
15 static Ptr New(const std::string &name) {
16 return Ptr(new Pet(name), std::default_delete<Pet>());
17 }
18
19private:
20 explicit Pet(const std::string &name) : name(name) {}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected