| 254 | |
| 255 | private: |
| 256 | void *operator new(size_t bytes) { |
| 257 | void *ptr = std::malloc(bytes); |
| 258 | if (ptr) { |
| 259 | return ptr; |
| 260 | } |
| 261 | throw std::bad_alloc{}; |
| 262 | } |
| 263 | }; |
| 264 | py::class_<PrivateOpNew>(m, "PrivateOpNew").def_readonly("value", &PrivateOpNew::value); |
| 265 | m.def("private_op_new_value", []() { return PrivateOpNew(); }); |
nothing calls this directly
no outgoing calls
no test coverage detected