MCPcopy Create free account
hub / github.com/pybind/pybind11 / operator new

Method operator new

tests/test_class.cpp:316–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314 struct HasOpNewDel {
315 std::uint64_t i;
316 static void *operator new(size_t s) {
317 py::print("A new", s);
318 return ::operator new(s);
319 }
320 static void *operator new(size_t s, void *ptr) {
321 py::print("A placement-new", s);
322 return ptr;

Callers

nothing calls this directly

Calls 1

printFunction · 0.85

Tested by

no test coverage detected