-
We use This seems to be intentional behavior - from reading the source and from the answer here #272 Should I abandon this approach? Perhaps the better approach would be to do this in the user binding code, not the type caster code for |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Indeed, type casters can't raise by design. You could either handle this on the Python interface or fork nanobind to handle |
Beta Was this translation helpful? Give feedback.
-
It is possible for |
Beta Was this translation helpful? Give feedback.
Indeed, type casters can't raise by design.
std::expected
as a C++23 feature is also beyond what can be handled in nanobind, which is a C++17 library.You could either handle this on the Python interface or fork nanobind to handle
std::expected
specially. However, I would be unlikely to merge such a feature here, in case that is relevant.