Skip to content

Commit

Permalink
Commenting out const in def_buffer(... const). With this, test_buffer…
Browse files Browse the repository at this point in the history
…s 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.
  • Loading branch information
rwgk committed Feb 9, 2021
1 parent 63abf87 commit 6349531
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/pybind11/pybind11.h
Original file line number Diff line number Diff line change
Expand Up @@ -1409,7 +1409,8 @@ class class_ : public detail::generic_type {

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>
Expand Down

0 comments on commit 6349531

Please sign in to comment.