Commit c1cd022
tests: Add test for
* Add test for boost::histogram::func_transform situation.
* Resolve clang-tidy errors
```
/__w/pybind11/pybind11/tests/test_callbacks.cpp:33:9: error: 'auto rec' can be declared as 'auto *rec' [readability-qualified-auto,-warnings-as-errors]
33 | auto rec = c.get_pointer<py::detail::function_record>();
| ^~~~
| auto *
/__w/pybind11/pybind11/tests/test_callbacks.cpp:41:13: error: 'auto cap' can be declared as 'auto *cap' [readability-qualified-auto,-warnings-as-errors]
41 | auto cap = reinterpret_cast<capture *>(&rec->data);
| ^~~~
| auto *
```
* Replace `apply_custom_transform()` implementation using `make_caster<std::function<raw_t>>`
* Add func_is_stateless_with_exact_type feature in pybind11/functional.h
* tests: use std::function::target
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
* style: pre-commit fixes
* Resolve clang-tidy error
```
/__w/pybind11/pybind11/tests/test_callbacks.cpp:33:5: error: 'auto cfunc' can be declared as 'auto *cfunc' [readability-qualified-auto,-warnings-as-errors]
33 | auto cfunc = func.target<raw_t *>();
| ^~~~
| auto *
```
---------
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>boost::histogram::func_transform situation. (#5582)1 parent f365314 commit c1cd022
2 files changed
+45
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
17 | 43 | | |
18 | 44 | | |
19 | 45 | | |
| |||
272 | 298 | | |
273 | 299 | | |
274 | 300 | | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
275 | 308 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
0 commit comments