hxcpp how to add const meta to return type?
@:const is not working.
int getX() const { return x; } //how to add const in hxcpp?
void setX(int x_) { x = x_; }
and haxe code
var _x:Float = 0;
@:keep
public var x(get, set):Float;
function set_x(newX:Float) {
_x = newX;
trace('set x wasm=$newX');
return _x;
}
@:const
function get_x() {
return _x;
}
from emcc
https://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#classes