| 42 | } |
| 43 | |
| 44 | void bind_ConstructorStats(py::module_ &m) { |
| 45 | py::class_<ConstructorStats>(m, "ConstructorStats") |
| 46 | .def("alive", &ConstructorStats::alive) |
| 47 | .def("values", &ConstructorStats::values) |
| 48 | .def_readwrite("default_constructions", &ConstructorStats::default_constructions) |
| 49 | .def_readwrite("copy_assignments", &ConstructorStats::copy_assignments) |
| 50 | .def_readwrite("move_assignments", &ConstructorStats::move_assignments) |
| 51 | .def_readwrite("copy_constructions", &ConstructorStats::copy_constructions) |
| 52 | .def_readwrite("move_constructions", &ConstructorStats::move_constructions) |
| 53 | .def_static("get", |
| 54 | (ConstructorStats & (*) (py::object)) & ConstructorStats::get, |
| 55 | py::return_value_policy::reference_internal) |
| 56 | |
| 57 | // Not exactly ConstructorStats, but related: expose the internal pybind number of |
| 58 | // registered instances to allow instance cleanup checks (invokes a GC first) |
| 59 | .def_static("detail_reg_inst", []() { |
| 60 | ConstructorStats::gc(); |
| 61 | return py::detail::num_registered_instances(); |
| 62 | }); |
| 63 | } |
| 64 | |
| 65 | const char *cpp_std() { |
| 66 | return |
no test coverage detected