Exercises def_buffer(Return (Class::*)(Args...) const & noexcept)
| 554 | ~OneDBufferConstLRefNoexcept() { delete[] m_data; } |
| 555 | // Exercises def_buffer(Return (Class::*)(Args...) const & noexcept) |
| 556 | py::buffer_info get_buffer() const & noexcept { |
| 557 | return py::buffer_info(m_data, |
| 558 | sizeof(float), |
| 559 | py::format_descriptor<float>::format(), |
| 560 | 1, |
| 561 | {m_n}, |
| 562 | {(py::ssize_t) sizeof(float)}, |
| 563 | /*readonly=*/true); |
| 564 | } |
| 565 | }; |
| 566 | py::class_<OneDBufferConstLRefNoexcept>( |
| 567 | m, "OneDBufferConstLRefNoexcept", py::buffer_protocol()) |
nothing calls this directly
no test coverage detected