You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering whether pybind11 happily accepting this kind of functions could be misleading:
.def("f", [](int& x) { x = 42; })
One may assume that pushing back to a std::vector<>& would update the list (although a related example is in the docs). Basically, for non-opaque types that require type conversion, is it possible to disable passing them as non-const refs, or do we not have this info at compile time?