Fix confusing weakref constructor overload (#2832)
* Demonstrate issue with weakref constructor overloads * Fix weakref constructor to convert on being passed a non-weakref object * Improve on nonlocal-scoped variable in test_weakref * Keep backwards-compatibility by introducing PYBIND11_OBJECT_CVT_DEFAULT macro * Simplify test_weakref
Showing
Please
register
or
sign in
to comment