You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The policy "out_value" seems to be broken (for a long time?), it is also not covered by the tests (test_policies.cpp has "pure_out_value" only). The following example is copied from the luabind documentation, GCC and Clang generate an error about calling a non-static member function:
.../luabind/out_value_policy.hpp:126:71: error: cannot call member function ‘int luabind::native_converter_base::match(lua_State*, luabind::detail::by_value, int) [with T = float; Derived = luabind::default_converter; lua_State = lua_State]’ without object
return converter::match(L, LUABIND_DECORATE_TYPE(T), index);
Example:
#include "test.hpp"
#include
#include
void f(float& val) { val = val + 10.f; }
void test_main(lua_State* L)
{
using namespace luabind;
module(L)
[
def("f", &f, out_value(_1)) // compiles with "pure_out_value"
];
// out_value
DOSTRING(L,
"a = f(5)\n"
"assert(a == 15)");
}
The text was updated successfully, but these errors were encountered:
The policy "out_value" seems to be broken (for a long time?), it is also not covered by the tests (test_policies.cpp has "pure_out_value" only). The following example is copied from the luabind documentation, GCC and Clang generate an error about calling a non-static member function:
Example:
The text was updated successfully, but these errors were encountered: