issue with out_value policy

feng qiu <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
Hello everyone
I am new to luabind, i got some problems on using out_value policy.
Here are errors while compiling with visual studio 2008, luabind 0.9.1, lua
5.1.4,boost 1.46.1

I did a search via google, but there is no useful information for this
problem.
Does anybody have the same issue or know how to resolve it?
Thanks in advance.

code:
-------------------------------------------------------------------------------------------------------
void TestOut(int& iValue)
{
iValue+=100;
}
.........
luabind::module(L)
[
luabind::def("TestOut",&TestOut,luabind::out_value(_1))
];
-------------------------------------------------------------------------------------------------------
errors:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1>f:\libs\luabind-0.9.1\luabind\out_value_policy.hpp(105) : error C2352:
'luabind::native_converter_base<T>::match' : illegal call of non-static
member function
1>        with
1>        [
1>            T=int
1>        ]
1>        f:\libs\luabind-0.9.1\luabind\detail\policy.hpp(606) : see
declaration of 'luabind::native_converter_base<T>::match'
1>        with
1>        [
1>            T=int
1>        ]
1>
 f:\libs\boost_1_46_1\boost\preprocessor\iteration\detail\local.hpp(34) :
see reference to function template instantiation 'int
luabind::detail::out_value_converter<Size,Policies>::match<T>(lua_State
*,luabind::detail::by_reference<T>,int)' being compiled
1>        with
1>        [
1>            Size=4,
1>            Policies=luabind::detail::null_type,
1>            T=int
1>        ]
1>        f:\libs\luabind-0.9.1\luabind\detail\call.hpp(89) : see reference
to function template instantiation 'int
luabind::detail::invoke_normal<void(__cdecl *)(int
&),boost::mpl::vector2<T0,T1>,Policies>(lua_State *,const
luabind::detail::function_object &,luabind::detail::invoke_context &,const F
&,Signature,const Policies &,boost::mpl::long_<N>,boost::mpl::true_)' being
compiled
1>        with
1>        [
1>            T0=void,
1>            T1=int &,
1>
 Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<1,luabind::detail::null_type>,luabind::detail::null_type>,
1>            F=void (__cdecl *)(int &),
1>            Signature=boost::mpl::vector2<void,int &>,
1>            N=1
1>        ]
1>        f:\libs\luabind-0.9.1\luabind\detail\call.hpp(101) : see reference
to function template instantiation 'int
luabind::detail::invoke0<void(__cdecl *)(int
&),boost::mpl::vector2<T0,T1>,Policies,boost::is_void<void>>(lua_State
*,const luabind::detail::function_object &,luabind::detail::invoke_context
&,const F &,Signature,const Policies &,IsVoid,boost::mpl::false_)' being
compiled
1>        with
1>        [
1>            T0=void,
1>            T1=int &,
1>
 Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<1,luabind::detail::null_type>,luabind::detail::null_type>,
1>            F=void (__cdecl *)(int &),
1>            Signature=boost::mpl::vector2<void,int &>,
1>            IsVoid=boost::is_void<void>
1>        ]
1>        f:\libs\luabind-0.9.1\luabind\make_function.hpp(41) : see
reference to function template instantiation 'int
luabind::detail::invoke<void(__cdecl *)(int
&),boost::mpl::vector2<T0,T1>,Policies>(lua_State *,const
luabind::detail::function_object &,luabind::detail::invoke_context &,const F
&,Signature,const Policies &)' being compiled
1>        with
1>        [
1>            T0=void,
1>            T1=int &,
1>
 Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<1,luabind::detail::null_type>,luabind::detail::null_type>,
1>            F=void (__cdecl *)(int &),
1>            Signature=boost::mpl::vector2<void,int &>
1>        ]
1>        f:\libs\luabind-0.9.1\luabind\make_function.hpp(40) : while
compiling class template member function 'int
luabind::detail::function_object_impl<F,Signature,Policies>::call(lua_State
*,luabind::detail::invoke_context &) const'
1>        with
1>        [
1>            F=void (__cdecl *)(int &),
1>            Signature=boost::mpl::vector2<void,int &>,
1>
 Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<1,luabind::detail::null_type>,luabind::detail::null_type>
1>        ]
1>        f:\libs\luabind-0.9.1\luabind\make_function.hpp(108) : see
reference to class template instantiation
'luabind::detail::function_object_impl<F,Signature,Policies>' being compiled
1>        with
1>        [
1>            F=void (__cdecl *)(int &),
1>            Signature=boost::mpl::vector2<void,int &>,
1>
 Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<1,luabind::detail::null_type>,luabind::detail::null_type>
1>        ]
1>        f:\libs\luabind-0.9.1\luabind\function.hpp(28) : see reference to
function template instantiation 'luabind::adl::object
luabind::make_function<void(__cdecl *)(int
&),boost::mpl::vector2<T0,T1>,Policies>(lua_State *,F,Signature,Policies)'
being compiled
1>        with
1>        [
1>            T0=void,
1>            T1=int &,
1>
 Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<1,luabind::detail::null_type>,luabind::detail::null_type>,
1>            F=void (__cdecl *)(int &),
1>            Signature=boost::mpl::vector2<void,int &>
1>        ]
1>        f:\libs\luabind-0.9.1\luabind\function.hpp(27) : while compiling
class template member function 'void
luabind::detail::function_registration<F,Policies>::register_(lua_State *)
const'
1>        with
1>        [
1>            F=void (__cdecl *)(int &),
1>
 Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<1,luabind::detail::null_type>,luabind::detail::null_type>
1>        ]
1>        f:\libs\luabind-0.9.1\luabind\function.hpp(50) : see reference to
class template instantiation
'luabind::detail::function_registration<F,Policies>' being compiled
1>        with
1>        [
1>            F=void (__cdecl *)(int &),
1>
 Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<1,luabind::detail::null_type>,luabind::detail::null_type>
1>        ]
1>        f:\projects\my projects\luabindtest\luabindtest\main.cpp(91) : see
reference to function template instantiation 'luabind::scope
luabind::def<void(__cdecl *)(int &),luabind::detail::policy_cons<H,T>>(const
char *,F,const Policies &)' being compiled
1>        with
1>        [
1>
 H=luabind::detail::out_value_policy<1,luabind::detail::null_type>,
1>            T=luabind::detail::null_type,
1>            F=void (__cdecl *)(int &),
1>
 Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<1,luabind::detail::null_type>,luabind::detail::null_type>
1>        ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- 
Charlie

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev

_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.