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

Method operator new

tests/test_class.cpp:369–372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367 struct HasOpNewDelBoth {
368 std::uint32_t i[8];
369 static void *operator new(size_t s) {
370 py::print("D new", s);
371 return ::operator new(s);
372 }
373 static void *operator new(size_t s, void *ptr) {
374 py::print("D placement-new", s);
375 return ptr;

Callers

nothing calls this directly

Calls 1

printFunction · 0.85

Tested by

no test coverage detected