Exercises def_buffer(Return (Class::*)(Args...) & noexcept)
| 534 | ~OneDBufferLRefNoexcept() { delete[] m_data; } |
| 535 | // Exercises def_buffer(Return (Class::*)(Args...) & noexcept) |
| 536 | py::buffer_info get_buffer() & noexcept { |
| 537 | return py::buffer_info(m_data, |
| 538 | sizeof(float), |
| 539 | py::format_descriptor<float>::format(), |
| 540 | 1, |
| 541 | {m_n}, |
| 542 | {(py::ssize_t) sizeof(float)}); |
| 543 | } |
| 544 | }; |
| 545 | py::class_<OneDBufferLRefNoexcept>(m, "OneDBufferLRefNoexcept", py::buffer_protocol()) |
| 546 | .def(py::init<py::ssize_t>()) |
nothing calls this directly
no test coverage detected