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

Method operator new

tests/test_class.cpp:331–334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

329 struct HasOpNewDelSize {
330 std::uint32_t i;
331 static void *operator new(size_t s) {
332 py::print("B new", s);
333 return ::operator new(s);
334 }
335 static void *operator new(size_t s, void *ptr) {
336 py::print("B placement-new", s);
337 return ptr;

Callers

nothing calls this directly

Calls 1

printFunction · 0.85

Tested by

no test coverage detected