Fingers crossed someone can help me,

I am working on the last phase of my project, long story short, I am trying 
to get Lua values from a table back into JavaScript. 
Like JavaScript, Lua is dynamically typed, I am going to be puting all 
sorts of values into a c++ std::map 

specification for this map:

   - keys can be double or string
   - values can be, boolean, string, null, double and map of the same type 
   (recursive)

For simplicity and your sake I have reduced this down somewhat.
 
std::variant<std::string, int> returnsAllSorts (){
    return stringOrInt(); // this could return either or.
}

EMSCRIPTEN_BINDINGS (my_module) {
    emscripten::function("returnsAllSorts", &returnsAllSorts);
}


 If the above wont work, what else can I try, in order to get a map with 
different values? 

-- 
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/1dd66e9e-0d09-4db8-a99d-d2a127104e27%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to