Commenting out const in def_buffer(... const). With this, test_buffers builds and runs with PYBIND11_USE_SMART_HOLDER_AS_DEFAULT. Explanation why the const needs to be removed, or fix elsewhere, is still needed, but left for later.

This commit is contained in:
Ralf W. Grosse-Kunstleve 2021-02-02 13:47:46 -08:00
parent 63abf87244
commit 6349531306

View File

@ -1409,7 +1409,8 @@ public:
template <typename Return, typename Class, typename... Args>
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 <typename C, typename D, typename... Extra>