arudradey/ml-cpu-storage / emsdk /upstream /emscripten /test /embind /test_embind_subclass_pointer.cpp
arudradey's picture
download
raw
474 Bytes
#include <emscripten/bind.h>
using namespace emscripten;
struct Base {
virtual ~Base() {}
};
struct Sub : Base {
Sub(Base* b) {}
};
struct SubWrapper : wrapper<Sub> {
EMSCRIPTEN_WRAPPER(SubWrapper);
};
EMSCRIPTEN_BINDINGS(test) {
class_<Base>("Base")
.constructor<>()
;
class_<Sub>("Sub")
.allow_subclass<SubWrapper>("SubWrapper", constructor<Base*>(), allow_raw_pointer<arg<0>>())
;
}
int main() {
return 0;
}

Xet Storage Details

Size:
474 Bytes
·
Xet hash:
192f88b431452d067085672cfc335bb8d440692353c6e3eb510d559bd6febc8b

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.