-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add test for boost::histogram::func_transform
situation.
#5582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test for boost::histogram::func_transform
situation.
#5582
Conversation
``` /__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 * ```
…std::function<raw_t>>`
106ef8e
to
d2418f0
Compare
boost::histogram::func_transform
situation.func_is_stateless_with_exact_type
feature in pybind11/functional.h
Signed-off-by: Henry Schreiner <[email protected]>
func_is_stateless_with_exact_type
feature in pybind11/functional.hboost::histogram::func_transform
situation.
``` /__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 * ```
tests/test_callbacks.cpp
Outdated
return -100; | ||
} | ||
auto func = static_cast<std::function<raw_t> &>(func_caster); | ||
auto cfunc = func.target<raw_t *>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto cfunc = func.target<raw_t *>(); | |
raw_t* cfunc = func.target<raw_t *>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, you fixed it
There was a problem hiding this comment.
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.
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: