문제

It is possible, using luabind, to bind the following function?

void retByRef(int &a, int& b) {
    a = 10; b = 10
}

I was trying the following, but it is only working with functions that has one parameter

def("retByRef", &retByRef, pure_out_value(_1))

There is way to specify a policy for each parameter?

도움이 되었습니까?

해결책

Ok, I found a + operator that can be used to add policies, so

def("retByRef", &retByRef, pure_out_value(_1) + pure_out_value(_2))
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top