From ee2dd22b58f705ce128c4d90e118d8139cc2bf22 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 22 Sep 2020 12:31:28 -0400 Subject: [PATCH] fix: warning on latest AppleClang 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 c1d17f7ee2..da3a78c250 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); }