Hi I want to use embind to expose below function with reference as
parameter, and build it using dmcc --bind flag,
int testReference( int& input)
{
int ret = input;
return ret;
}
EMSCRIPTEN_BINDINGS(my_module) {
function("testReference", &testReference);
}
however I am facing the below errors:
*/Users/swd/Emscripten/emsdk_portable/emscripten/1.25.0/system/include/emscripten/bind.h:316:25:
**error: *
* non-const lvalue reference to type 'int' cannot bind to a temporary
of type 'int'*
internal::BindingType<Args>::fromWireType(args)...
* ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
Does Embind support functions with reference as parameter?
Thanks,
--
You received this message because you are subscribed to the Google Groups
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.