Gabriel
> Something like (pseudo-code):
>
> class TranscodedImage {
>
> std::vector<uint8_t> dst;
>
> val get_typed_memory_view() {
>
> return typed_memory_view(dst.size(), dst.data())
>
> }
>
I’m trying to do this now but I’m getting the error
/Users/mark/Projects/github/KTX-Software/interface/js_binding/transcoder_wrapper.cpp:39:19:
error:
no viable conversion from returned value of type 'memory_view<unsigned
char>' to function return type 'emscripten::val'
return typed_memory_view(image.size(), image.data())
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/mark/Projects/github/emsdk/upstream/emscripten/system/include/emscripten/val.h:357:9:
note:
candidate constructor not viable: no known conversion from
'memory_view<unsigned char>' to 'emscripten::val &&' for 1st argument
val(val&& v)
^
/Users/mark/Projects/github/emsdk/upstream/emscripten/system/include/emscripten/val.h:363:9:
note:
candidate constructor not viable: no known conversion from
'memory_view<unsigned char>' to 'const emscripten::val &' for 1st argument
val(const val& v)
Any ideas. According to val.h "A val can be constructed by explicit
construction from any C++ type.”.
Regards
-Mark
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/emscripten-discuss/7A1F7114-AEB3-4587-A80A-FF864C4A10CC%40callow.im.
signature.asc
Description: Message signed with OpenPGP
