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

Method new_instance

tests/test_class.cpp:99–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97 NoConstructorNew(const NoConstructorNew &) = default;
98 NoConstructorNew(NoConstructorNew &&) = default;
99 static NoConstructorNew *new_instance() {
100 auto *ptr = new NoConstructorNew();
101 print_created(ptr, "via new_instance");
102 return ptr;
103 }
104 ~NoConstructorNew() { print_destroyed(this); }
105 };
106

Callers

nothing calls this directly

Calls 1

print_createdFunction · 0.85

Tested by

no test coverage detected