File size: 441 Bytes
00df61d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | #include <functional>
#include <emscripten/bind.h>
using namespace emscripten;
int main() {
}
int foo(int a) {
return 0;
}
int foo(float a) {
return 0;
}
EMSCRIPTEN_BINDINGS(bindings) {
// Overloads in embind all need to have a unique number of arguments.
// This is invalid since both overloads take just one argument.
function("foo", select_overload<int(int)>(&foo));
function("foo", select_overload<int(float)>(&foo));
}
|