mirror of
https://github.com/pybind/pybind11.git
synced 2026-06-06 07:51:47 +00:00
clang-tidy readability-qualified-auto (#3702)
* Adding readability-qualified-auto to .clang-tidy
Ported from @henryiii's 287527f705
* fix: support Python < 3.6
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
committed by
GitHub
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