diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index d472531f3..e20096a8e 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -1004,7 +1004,7 @@ template struct init { typename std::enable_if::value && !std::is_constructible::value, int>::type = 0> void execute(pybind11::class_ &class_, const Extra&... extra) const { - class_.def("__init__", [](Alias *self, Args... args) { new (self) Alias(args...); }, extra...); + class_.def("__init__", [](Alias *self_, Args... args) { new (self_) Alias(args...); }, extra...); } };