From 3c7ef56bb651c4d31670c0db42d9555755b1172a Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 22 Sep 2020 17:36:25 -0400 Subject: [PATCH] fix: warning on latest AppleClang (#2522) Fixed in #2510 but reintroduced on one line by #2126 --- include/pybind11/pybind11.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index c1d17f7ee..da3a78c25 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -1489,7 +1489,7 @@ PYBIND11_NAMESPACE_BEGIN(detail) inline str enum_name(handle arg) { dict entries = arg.get_type().attr("__entries"); - for (const auto &kv : entries) { + for (auto kv : entries) { if (handle(kv.second[int_(0)]).equal(arg)) return pybind11::str(kv.first); }