Skip to content

Commit 6349531

Browse files
committed
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.
1 parent 63abf87 commit 6349531

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/pybind11/pybind11.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,8 @@ class class_ : public detail::generic_type {
14091409

14101410
template <typename Return, typename Class, typename... Args>
14111411
class_ &def_buffer(Return (Class::*func)(Args...) const) {
1412-
return def_buffer([func] (const type &obj) { return (obj.*func)(); });
1412+
// NEEDED: Explanation why the const needs to be removed, or fix elsewhere.
1413+
return def_buffer([func] (/*const*/ type &obj) { return (obj.*func)(); });
14131414
}
14141415

14151416
template <typename C, typename D, typename... Extra>

0 commit comments

Comments
 (0)