Closed sonygod closed 1 year ago
@:keep static function testInstance3(test:UniquePtr<Test>){ test.say(); } var test2:UniquePtr<Test>=new Test(); testInstance3(test2);// is there any function like std::move here?
only generate code
std::unique_ptr<Test> test2 = std::make_unique<Test>(); Main::testInstance3(test2);
should generate code like
std::unique_ptr<Test> test2 = std::make_unique<Test>(); Main::testInstance3(std::move(test2));
👌 Noted! I'll add a function to generate std::move statements.
std::move
I'll also add a cxx.Move<T> to generate Type&& arguments as well.
cxx.Move<T>
Type&&
Added!
nice! @RobertBorghese
only generate code
should generate code like