diff --git a/include/pybind11/pybind11.h b/include/pybind11/pybind11.h index 017b2c655..a5aa055fa 100644 --- a/include/pybind11/pybind11.h +++ b/include/pybind11/pybind11.h @@ -1409,7 +1409,8 @@ public: template class_ &def_buffer(Return (Class::*func)(Args...) const) { - return def_buffer([func] (const type &obj) { return (obj.*func)(); }); + // NEEDED: Explanation why the const needs to be removed, or fix elsewhere. + return def_buffer([func] (/*const*/ type &obj) { return (obj.*func)(); }); } template