Ensure compilation for 2 more function types

This commit is contained in:
ThePhD 2016-04-07 05:43:44 -04:00
parent 4854cc98a5
commit 4cdcac2001
2 changed files with 3 additions and 1 deletions

View File

@ -31,7 +31,7 @@ namespace function_detail {
typedef meta::bind_traits<meta::Unqualified<F>> traits_type;
typedef typename traits_type::args_type args_type;
typedef meta::tuple_types<typename traits_type::return_type> return_type;
return stack::call_into_lua(return_type(), args_type(), fx, L, 1);
return stack::call_into_lua(return_type(), args_type(), L, 1, fx);
}
template <typename R, typename V, V, typename T>

View File

@ -467,6 +467,8 @@ TEST_CASE("functions/all-kinds", "Register all kinds of functions, make sure the
lua.set_function("k", &test_2::a);
lua.set_function("l", sol::c_call<decltype(&test_1::a), &test_1::a>);
lua.set_function("m", &test_2::a, &t2);
lua.set_function("n", sol::c_call<decltype(&test_1::x_bark), &test_1::x_bark>);
lua.set_function("o", sol::c_call<decltype(test_1::x_bark), test_1::x_bark>);
lua.script(R"(
o1 = test_1.new()