robotpy / robotpy-build

(mostly) automated C++ wrapping for Python
BSD 3-Clause "New" or "Revised" License
35 stars 16 forks source link

Using return_value_policy::copy for non-copyable type #195

Open virtuald opened 1 year ago

virtuald commented 1 year ago

InitSendable (see https://github.com/robotpy/robotpy-commands-v2/pull/22 for example) takes a non-copyable type as an argument. Since the smart-holder branch of pybind11 can invalidate objects, we might be able to automatically detect and fix this case at compile time. Would need some thought.