Skip to content

Conversation

@rwgk
Copy link
Collaborator

@rwgk rwgk commented Mar 27, 2025

Description

The added test reflects this change in boost-histogram:

The APIs used in the added test code here are considered public.

See also: Discussions under PR #5580

Suggested changelog entry:

rwgk added 4 commits March 27, 2025 10:24
```
/__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 *
```
@rwgk rwgk force-pushed the add_test_for_boost_histogram_situation branch from 106ef8e to d2418f0 Compare March 27, 2025 19:35
@rwgk rwgk changed the title [WIP] Add test for boost::histogram::func_transform situation. Add func_is_stateless_with_exact_type feature in pybind11/functional.h Mar 27, 2025
@rwgk rwgk changed the title Add func_is_stateless_with_exact_type feature in pybind11/functional.h Add test for boost::histogram::func_transform situation. Mar 27, 2025
```
/__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 *
```
return -100;
}
auto func = static_cast<std::function<raw_t> &>(func_caster);
auto cfunc = func.target<raw_t *>();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
auto cfunc = func.target<raw_t *>();
raw_t* cfunc = func.target<raw_t *>();

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind, you fixed it

Copy link
Collaborator Author

@rwgk rwgk Mar 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I just pusehd the auto * change as suggested by clang-tidy.

@rwgk rwgk marked this pull request as ready for review March 27, 2025 21:05
@henryiii henryiii merged commit c1cd022 into pybind:master Mar 28, 2025
74 checks passed
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Mar 28, 2025
@rwgk rwgk deleted the add_test_for_boost_histogram_situation branch March 28, 2025 15:52
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label Mar 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants