clang-tidy readability-qualified-auto (#3702)
* Adding readability-qualified-auto to .clang-tidy Ported from @henryiii's https://github.com/pybind/pybind11/pull/3683/commits/287527f705c8badee8ba9f6278d691fe0450ae43 * fix: support Python < 3.6 Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
co-authored by
Henry Schreiner
parent
b4f5350d0d
commit
7769e7719c
@@ -148,7 +148,7 @@ TEST_SUBMODULE(callbacks, m) {
|
||||
py::arg("expect_none") = false);
|
||||
m.def("test_dummy_function", [](const std::function<int(int)> &f) -> std::string {
|
||||
using fn_type = int (*)(int);
|
||||
auto result = f.target<fn_type>();
|
||||
const auto *result = f.target<fn_type>();
|
||||
if (!result) {
|
||||
auto r = f(1);
|
||||
return "can't convert to function pointer: eval(1) = " + std::to_string(r);
|
||||
|
||||
Reference in New Issue
Block a user