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

Method new_instance

tests/test_class.cpp:88–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

86 NoConstructor(const NoConstructor &) = default;
87 NoConstructor(NoConstructor &&) = default;
88 static NoConstructor *new_instance() {
89 auto *ptr = new NoConstructor();
90 print_created(ptr, "via new_instance");
91 return ptr;
92 }
93 ~NoConstructor() { print_destroyed(this); }
94 };
95 struct NoConstructorNew {

Callers 1

test_instanceFunction · 0.45

Calls 1

print_createdFunction · 0.85

Tested by

no test coverage detected