nbind
nbind copied to clipboard
Add a policy for automatic return value downcasting
When augmenting a C++ class for wrapping like https://github.com/charto/nbind/issues/35#issuecomment-260106802, return values of the non-augmented type should automatically downcast to the augmented type. Configured like:
method(getNode, nbind::Downcast(Node, JS_Node));
Another possible (better?) syntax would be:
NBIND_CLASS(Node) {
downcast(JS_Node);
}