Quantcast

VC10 and out_value policy compile issues

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

VC10 and out_value policy compile issues

me-98
I am having a problem and it seems after searching on the net it's
happening to others as well. However, I can not seem to see any replies on
how to fix it.

I am using Microsoft Visual C++ 2010, Boost 1.43, Lua 5.1.4, LuaBind 0.9

I have a class defined like so in C++:

class TestOutPolicy
{
public:
    TestOutPolicy(void){};
    ~TestOutPolicy(void){};

    void GetValue(const std::string& key, std::string& returnValue){
returnValue = "Got It";}

};


I bind the class like so:

    luabind::module(lb)[
        luabind::class_<TestOutPolicy>("TestOutPolicy")
                .def(luabind::constructor<>())
                .def("GetValue", &TestOutPolicy::GetValue,
luabind::out_value(_3))
    ];


The errors when you attempt to compile using either the luabind::out_value
or luabind::pure_out_value are as follows:



1>c:\3rdparty\lua\luabind-0.9\luabind\out_value_policy.hpp(78): error
C2784: 'luabind::detail::char_array<sizeof(identity<T>::type)>
luabind::detail::indirect_sizeof_test(luabind::detail::by_value<T>)' :
could not deduce template argument for 'luabind::detail::by_value<T>' from
'luabind::detail::by_reference<T>'
1>          with
1>          [
1>              T=std::string
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\luabind\out_value_policy.hpp(71) :
see declaration of 'luabind::detail::indirect_sizeof_test'
1>          c:\3rdparty\lua\luabind-0.9\luabind\out_value_policy.hpp(160)
: see reference to class template instantiation
'luabind::detail::indirect_sizeof<T>' being compiled
1>          with
1>          [
1>              T=a2
1>          ]
1>
c:\3rdparty\boost\boost_1_43_0\boost\mpl\aux_\preprocessed\plain\apply_wrap.hpp(49)
: see reference to class template instantiation
'luabind::detail::out_value_policy<BOOST_PP_ITERATION_0,Policies>::apply<T,Direction>'
being compiled
1>          with
1>          [
1>              BOOST_PP_ITERATION_0=3,
1>              Policies=luabind::detail::null_type,
1>              T=a2 ,
1>              Direction=luabind::detail::lua_to_cpp
1>          ]
1>
c:\3rdparty\boost\boost_1_43_0\boost\preprocessor\iteration\detail\local.hpp(40)
: see reference to class template instantiation
'boost::mpl::apply_wrap2<F,T1,T2>' being compiled
1>          with
1>          [
1>              F=p2,
1>              T1=a2,
1>              T2=luabind::detail::lua_to_cpp
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\luabind\detail\call.hpp(78) : see
reference to function template instantiation 'int
luabind::detail::invoke_member<F,boost::mpl::vector4<T0,T1,T2,T3>,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>              F=void (__thiscall TestOutPolicy::* )(const std::string
&,std::string &),
1>              T0=void,
1>              T1=TestOutPolicy &,
1>              T2=const std::string &,
1>              T3=std::string &,
1>
Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>,
1>              Signature=boost::mpl::vector4<void,TestOutPolicy &,const
std::string &,std::string &>,
1>              N=3
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\luabind\detail\call.hpp(101) : see
reference to function template instantiation 'int
luabind::detail::invoke0<F,boost::mpl::vector4<T0,T1,T2,T3>,Policies,boost::is_void<void>>(lua_State
*,const luabind::detail::function_object &,luabind::detail::invoke_context
&,const F &,Signature,const Policies &,IsVoid,boost::mpl::true_)' being
compiled
1>          with
1>          [
1>              F=void (__thiscall TestOutPolicy::* )(const std::string
&,std::string &),
1>              T0=void,
1>              T1=TestOutPolicy &,
1>              T2=const std::string &,
1>              T3=std::string &,
1>
Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>,
1>              Signature=boost::mpl::vector4<void,TestOutPolicy &,const
std::string &,std::string &>,
1>              IsVoid=boost::is_void<void>
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\luabind\make_function.hpp(41) :
see reference to function template instantiation 'int
luabind::detail::invoke<F,boost::mpl::vector4<T0,T1,T2,T3>,Policies>(lua_State
*,const luabind::detail::function_object &,luabind::detail::invoke_context
&,const F &,Signature,const Policies &)' being compiled
1>          with
1>          [
1>              F=void (__thiscall TestOutPolicy::* )(const std::string
&,std::string &),
1>              T0=void,
1>              T1=TestOutPolicy &,
1>              T2=const std::string &,
1>              T3=std::string &,
1>
Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>,
1>              Signature=boost::mpl::vector4<void,TestOutPolicy &,const
std::string &,std::string &>
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\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 (__thiscall TestOutPolicy::* )(const std::string
&,std::string &),
1>              Signature=boost::mpl::vector4<void,TestOutPolicy &,const
std::string &,std::string &>,
1>
Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\luabind\make_function.hpp(103) :
see reference to class template instantiation
'luabind::detail::function_object_impl<F,Signature,Policies>' being
compiled
1>          with
1>          [
1>              F=void (__thiscall TestOutPolicy::* )(const std::string
&,std::string &),
1>              Signature=boost::mpl::vector4<void,TestOutPolicy &,const
std::string &,std::string &>,
1>
Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\luabind\class.hpp(312) : see
reference to function template instantiation 'luabind::adl::object
luabind::make_function<F,boost::mpl::vector4<T0,T1,T2,T3>,Policies>(lua_State
*,F,Signature,Policies)' being compiled
1>          with
1>          [
1>              F=void (__thiscall TestOutPolicy::* )(const std::string
&,std::string &),
1>              T0=void,
1>              T1=TestOutPolicy &,
1>              T2=const std::string &,
1>              T3=std::string &,
1>
Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>,
1>              Signature=boost::mpl::vector4<void,TestOutPolicy &,const
std::string &,std::string &>
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\luabind\class.hpp(310) : while
compiling class template member function 'void
luabind::detail::memfun_registration<Class,F,Policies>::register_(lua_State
*) const'
1>          with
1>          [
1>              Class=TestOutPolicy,
1>              F=void (__thiscall TestOutPolicy::* )(const std::string
&,std::string &),
1>
Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\luabind\class.hpp(828) : see
reference to class template instantiation
'luabind::detail::memfun_registration<Class,F,Policies>' being compiled
1>          with
1>          [
1>              Class=TestOutPolicy,
1>              F=void (__thiscall TestOutPolicy::* )(const std::string
&,std::string &),
1>
Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\luabind\class.hpp(585) : see
reference to function template instantiation 'luabind::class_<T>
&luabind::class_<T>::virtual_def<F,DefaultOrPolicies>(const char *,const F
&,const Policies &,luabind::detail::null_type,boost::mpl::true_)' being
compiled
1>          with
1>          [
1>              T=TestOutPolicy,
1>              F=void (__thiscall TestOutPolicy::* )(const std::string
&,std::string &),
1>
DefaultOrPolicies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>,
1>
Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>
1>          ]
1>          c:\src\kernel\TestOutPolicy.cpp(64) : see reference to
function template instantiation 'luabind::class_<T>
&luabind::class_<T>::def<void(__thiscall TestOutPolicy::* )(const
std::string &,std::string
&),luabind::detail::policy_cons<H,luabind::detail::null_type>>(const char
*,F,DefaultOrPolicies)' being compiled
1>          with
1>          [
1>              T=TestOutPolicy,
1>
H=luabind::detail::out_value_policy<3,luabind::detail::null_type>,
1>              F=void (__thiscall TestOutPolicy::* )(const std::string
&,std::string &),
1>
DefaultOrPolicies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>
1>          ]
1>c:\3rdparty\lua\luabind-0.9\luabind\out_value_policy.hpp(78): error
C2784: 'luabind::detail::char_array<sizeof(identity<T>::type)>
luabind::detail::indirect_sizeof_test(luabind::detail::by_const_pointer<T>)'
: could not deduce template argument for
'luabind::detail::by_const_pointer<T>' from
'luabind::detail::by_reference<T>'
1>          with
1>          [
1>              T=std::string
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\luabind\out_value_policy.hpp(68) :
see declaration of 'luabind::detail::indirect_sizeof_test'




------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: VC10 and out_value policy compile issues

Max McGuire
It looks like you should have _2 instead of _3.

Max

--
Technical Director
Unknown Worlds Entertainment
http://www.unknownworlds.com


On Thu, Jul 8, 2010 at 6:51 AM, <[hidden email]> wrote:
I am having a problem and it seems after searching on the net it's
happening to others as well. However, I can not seem to see any replies on
how to fix it.

I am using Microsoft Visual C++ 2010, Boost 1.43, Lua 5.1.4, LuaBind 0.9

I have a class defined like so in C++:

class TestOutPolicy
{
public:
   TestOutPolicy(void){};
   ~TestOutPolicy(void){};

   void GetValue(const std::string& key, std::string& returnValue){
returnValue = "Got It";}

};


I bind the class like so:

   luabind::module(lb)[
       luabind::class_<TestOutPolicy>("TestOutPolicy")
               .def(luabind::constructor<>())
               .def("GetValue", &TestOutPolicy::GetValue,
luabind::out_value(_3))
   ];


The errors when you attempt to compile using either the luabind::out_value
or luabind::pure_out_value are as follows:



1>c:\3rdparty\lua\luabind-0.9\luabind\out_value_policy.hpp(78): error
C2784: 'luabind::detail::char_array<sizeof(identity<T>::type)>
luabind::detail::indirect_sizeof_test(luabind::detail::by_value<T>)' :
could not deduce template argument for 'luabind::detail::by_value<T>' from
'luabind::detail::by_reference<T>'
1>          with
1>          [
1>              T=std::string
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\luabind\out_value_policy.hpp(71) :
see declaration of 'luabind::detail::indirect_sizeof_test'
1>          c:\3rdparty\lua\luabind-0.9\luabind\out_value_policy.hpp(160)
: see reference to class template instantiation
'luabind::detail::indirect_sizeof<T>' being compiled
1>          with
1>          [
1>              T=a2
1>          ]
1>
c:\3rdparty\boost\boost_1_43_0\boost\mpl\aux_\preprocessed\plain\apply_wrap.hpp(49)
: see reference to class template instantiation
'luabind::detail::out_value_policy<BOOST_PP_ITERATION_0,Policies>::apply<T,Direction>'
being compiled
1>          with
1>          [
1>              BOOST_PP_ITERATION_0=3,
1>              Policies=luabind::detail::null_type,
1>              T=a2 ,
1>              Direction=luabind::detail::lua_to_cpp
1>          ]
1>
c:\3rdparty\boost\boost_1_43_0\boost\preprocessor\iteration\detail\local.hpp(40)
: see reference to class template instantiation
'boost::mpl::apply_wrap2<F,T1,T2>' being compiled
1>          with
1>          [
1>              F=p2,
1>              T1=a2,
1>              T2=luabind::detail::lua_to_cpp
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\luabind\detail\call.hpp(78) : see
reference to function template instantiation 'int
luabind::detail::invoke_member<F,boost::mpl::vector4<T0,T1,T2,T3>,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>              F=void (__thiscall TestOutPolicy::* )(const std::string
&,std::string &),
1>              T0=void,
1>              T1=TestOutPolicy &,
1>              T2=const std::string &,
1>              T3=std::string &,
1>
Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>,
1>              Signature=boost::mpl::vector4<void,TestOutPolicy &,const
std::string &,std::string &>,
1>              N=3
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\luabind\detail\call.hpp(101) : see
reference to function template instantiation 'int
luabind::detail::invoke0<F,boost::mpl::vector4<T0,T1,T2,T3>,Policies,boost::is_void<void>>(lua_State
*,const luabind::detail::function_object &,luabind::detail::invoke_context
&,const F &,Signature,const Policies &,IsVoid,boost::mpl::true_)' being
compiled
1>          with
1>          [
1>              F=void (__thiscall TestOutPolicy::* )(const std::string
&,std::string &),
1>              T0=void,
1>              T1=TestOutPolicy &,
1>              T2=const std::string &,
1>              T3=std::string &,
1>
Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>,
1>              Signature=boost::mpl::vector4<void,TestOutPolicy &,const
std::string &,std::string &>,
1>              IsVoid=boost::is_void<void>
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\luabind\make_function.hpp(41) :
see reference to function template instantiation 'int
luabind::detail::invoke<F,boost::mpl::vector4<T0,T1,T2,T3>,Policies>(lua_State
*,const luabind::detail::function_object &,luabind::detail::invoke_context
&,const F &,Signature,const Policies &)' being compiled
1>          with
1>          [
1>              F=void (__thiscall TestOutPolicy::* )(const std::string
&,std::string &),
1>              T0=void,
1>              T1=TestOutPolicy &,
1>              T2=const std::string &,
1>              T3=std::string &,
1>
Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>,
1>              Signature=boost::mpl::vector4<void,TestOutPolicy &,const
std::string &,std::string &>
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\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 (__thiscall TestOutPolicy::* )(const std::string
&,std::string &),
1>              Signature=boost::mpl::vector4<void,TestOutPolicy &,const
std::string &,std::string &>,
1>
Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\luabind\make_function.hpp(103) :
see reference to class template instantiation
'luabind::detail::function_object_impl<F,Signature,Policies>' being
compiled
1>          with
1>          [
1>              F=void (__thiscall TestOutPolicy::* )(const std::string
&,std::string &),
1>              Signature=boost::mpl::vector4<void,TestOutPolicy &,const
std::string &,std::string &>,
1>
Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\luabind\class.hpp(312) : see
reference to function template instantiation 'luabind::adl::object
luabind::make_function<F,boost::mpl::vector4<T0,T1,T2,T3>,Policies>(lua_State
*,F,Signature,Policies)' being compiled
1>          with
1>          [
1>              F=void (__thiscall TestOutPolicy::* )(const std::string
&,std::string &),
1>              T0=void,
1>              T1=TestOutPolicy &,
1>              T2=const std::string &,
1>              T3=std::string &,
1>
Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>,
1>              Signature=boost::mpl::vector4<void,TestOutPolicy &,const
std::string &,std::string &>
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\luabind\class.hpp(310) : while
compiling class template member function 'void
luabind::detail::memfun_registration<Class,F,Policies>::register_(lua_State
*) const'
1>          with
1>          [
1>              Class=TestOutPolicy,
1>              F=void (__thiscall TestOutPolicy::* )(const std::string
&,std::string &),
1>
Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\luabind\class.hpp(828) : see
reference to class template instantiation
'luabind::detail::memfun_registration<Class,F,Policies>' being compiled
1>          with
1>          [
1>              Class=TestOutPolicy,
1>              F=void (__thiscall TestOutPolicy::* )(const std::string
&,std::string &),
1>
Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\luabind\class.hpp(585) : see
reference to function template instantiation 'luabind::class_<T>
&luabind::class_<T>::virtual_def<F,DefaultOrPolicies>(const char *,const F
&,const Policies &,luabind::detail::null_type,boost::mpl::true_)' being
compiled
1>          with
1>          [
1>              T=TestOutPolicy,
1>              F=void (__thiscall TestOutPolicy::* )(const std::string
&,std::string &),
1>
DefaultOrPolicies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>,
1>
Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>
1>          ]
1>          c:\src\kernel\TestOutPolicy.cpp(64) : see reference to
function template instantiation 'luabind::class_<T>
&luabind::class_<T>::def<void(__thiscall TestOutPolicy::* )(const
std::string &,std::string
&),luabind::detail::policy_cons<H,luabind::detail::null_type>>(const char
*,F,DefaultOrPolicies)' being compiled
1>          with
1>          [
1>              T=TestOutPolicy,
1>
H=luabind::detail::out_value_policy<3,luabind::detail::null_type>,
1>              F=void (__thiscall TestOutPolicy::* )(const std::string
&,std::string &),
1>
DefaultOrPolicies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>
1>          ]
1>c:\3rdparty\lua\luabind-0.9\luabind\out_value_policy.hpp(78): error
C2784: 'luabind::detail::char_array<sizeof(identity<T>::type)>
luabind::detail::indirect_sizeof_test(luabind::detail::by_const_pointer<T>)'
: could not deduce template argument for
'luabind::detail::by_const_pointer<T>' from
'luabind::detail::by_reference<T>'
1>          with
1>          [
1>              T=std::string
1>          ]
1>          c:\3rdparty\lua\luabind-0.9\luabind\out_value_policy.hpp(68) :
see declaration of 'luabind::detail::indirect_sizeof_test'




------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: VC10 and out_value policy compile issues

me-98
In reply to this post by me-98
Thx Max,

You are correct, I had a _2 before, and just changed to the _3 to make
sure I wasn't over looking something and forgot to change that back. I
found a work around for now but I'm still getting the error on compiling
in VS 2010. This may be some quirky problem with 2010 I'm not sure, as
soon as I find the solution I will post it up here.

Off topic:
Love the work you guys at Unknown Worlds are doing and have done, hope you
guys take the world by storm with NS2 :).

B.Russell

>
> It looks like you should have _2 instead of _3.
>
> Max
>
> --
> Technical Director
> Unknown Worlds Entertainment
> http://www.unknownworlds.com
>
>
> On Thu, Jul 8, 2010 at 6:51 AM, <[hidden email]> wrote:
>
>> I am having a problem and it seems after searching on the net it's
>> happening to others as well. However, I can not seem to see any replies
>> on
>> how to fix it.
>>
>> I am using Microsoft Visual C++ 2010, Boost 1.43, Lua 5.1.4, LuaBind 0.9
>>
>> I have a class defined like so in C++:
>>
>> class TestOutPolicy
>> {
>> public:
>>    TestOutPolicy(void){};
>>    ~TestOutPolicy(void){};
>>
>>    void GetValue(const std::string& key, std::string& returnValue){
>> returnValue = "Got It";}
>>
>> };
>>
>>
>> I bind the class like so:
>>
>>    luabind::module(lb)[
>>        luabind::class_<TestOutPolicy>("TestOutPolicy")
>>                .def(luabind::constructor<>())
>>                .def("GetValue", &TestOutPolicy::GetValue,
>> luabind::out_value(_3))
>>    ];
>>
>>
>> The errors when you attempt to compile using either the
>> luabind::out_value
>> or luabind::pure_out_value are as follows:
>>
>>
>>
>> 1>c:\3rdparty\lua\luabind-0.9\luabind\out_value_policy.hpp(78): error
>> C2784: 'luabind::detail::char_array<sizeof(identity<T>::type)>
>> luabind::detail::indirect_sizeof_test(luabind::detail::by_value<T>)' :
>> could not deduce template argument for 'luabind::detail::by_value<T>'
>> from
>> 'luabind::detail::by_reference<T>'
>> 1>          with
>> 1>          [
>> 1>              T=std::string
>> 1>          ]
>> 1>          c:\3rdparty\lua\luabind-0.9\luabind\out_value_policy.hpp(71)
>> :
>> see declaration of 'luabind::detail::indirect_sizeof_test'
>> 1>
>> c:\3rdparty\lua\luabind-0.9\luabind\out_value_policy.hpp(160)
>> : see reference to class template instantiation
>> 'luabind::detail::indirect_sizeof<T>' being compiled
>> 1>          with
>> 1>          [
>> 1>              T=a2
>> 1>          ]
>> 1>
>>
>> c:\3rdparty\boost\boost_1_43_0\boost\mpl\aux_\preprocessed\plain\apply_wrap.hpp(49)
>> : see reference to class template instantiation
>>
>> 'luabind::detail::out_value_policy<BOOST_PP_ITERATION_0,Policies>::apply<T,Direction>'
>> being compiled
>> 1>          with
>> 1>          [
>> 1>              BOOST_PP_ITERATION_0=3,
>> 1>              Policies=luabind::detail::null_type,
>> 1>              T=a2 ,
>> 1>              Direction=luabind::detail::lua_to_cpp
>> 1>          ]
>> 1>
>>
>> c:\3rdparty\boost\boost_1_43_0\boost\preprocessor\iteration\detail\local.hpp(40)
>> : see reference to class template instantiation
>> 'boost::mpl::apply_wrap2<F,T1,T2>' being compiled
>> 1>          with
>> 1>          [
>> 1>              F=p2,
>> 1>              T1=a2,
>> 1>              T2=luabind::detail::lua_to_cpp
>> 1>          ]
>> 1>          c:\3rdparty\lua\luabind-0.9\luabind\detail\call.hpp(78) :
>> see
>> reference to function template instantiation 'int
>>
>> luabind::detail::invoke_member<F,boost::mpl::vector4<T0,T1,T2,T3>,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>              F=void (__thiscall TestOutPolicy::* )(const std::string
>> &,std::string &),
>> 1>              T0=void,
>> 1>              T1=TestOutPolicy &,
>> 1>              T2=const std::string &,
>> 1>              T3=std::string &,
>> 1>
>>
>> Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>,
>> 1>              Signature=boost::mpl::vector4<void,TestOutPolicy &,const
>> std::string &,std::string &>,
>> 1>              N=3
>> 1>          ]
>> 1>          c:\3rdparty\lua\luabind-0.9\luabind\detail\call.hpp(101) :
>> see
>> reference to function template instantiation 'int
>>
>> luabind::detail::invoke0<F,boost::mpl::vector4<T0,T1,T2,T3>,Policies,boost::is_void<void>>(lua_State
>> *,const luabind::detail::function_object
>> &,luabind::detail::invoke_context
>> &,const F &,Signature,const Policies &,IsVoid,boost::mpl::true_)' being
>> compiled
>> 1>          with
>> 1>          [
>> 1>              F=void (__thiscall TestOutPolicy::* )(const std::string
>> &,std::string &),
>> 1>              T0=void,
>> 1>              T1=TestOutPolicy &,
>> 1>              T2=const std::string &,
>> 1>              T3=std::string &,
>> 1>
>>
>> Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>,
>> 1>              Signature=boost::mpl::vector4<void,TestOutPolicy &,const
>> std::string &,std::string &>,
>> 1>              IsVoid=boost::is_void<void>
>> 1>          ]
>> 1>          c:\3rdparty\lua\luabind-0.9\luabind\make_function.hpp(41) :
>> see reference to function template instantiation 'int
>>
>> luabind::detail::invoke<F,boost::mpl::vector4<T0,T1,T2,T3>,Policies>(lua_State
>> *,const luabind::detail::function_object
>> &,luabind::detail::invoke_context
>> &,const F &,Signature,const Policies &)' being compiled
>> 1>          with
>> 1>          [
>> 1>              F=void (__thiscall TestOutPolicy::* )(const std::string
>> &,std::string &),
>> 1>              T0=void,
>> 1>              T1=TestOutPolicy &,
>> 1>              T2=const std::string &,
>> 1>              T3=std::string &,
>> 1>
>>
>> Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>,
>> 1>              Signature=boost::mpl::vector4<void,TestOutPolicy &,const
>> std::string &,std::string &>
>> 1>          ]
>> 1>          c:\3rdparty\lua\luabind-0.9\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 (__thiscall TestOutPolicy::* )(const std::string
>> &,std::string &),
>> 1>              Signature=boost::mpl::vector4<void,TestOutPolicy &,const
>> std::string &,std::string &>,
>> 1>
>>
>> Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>
>> 1>          ]
>> 1>          c:\3rdparty\lua\luabind-0.9\luabind\make_function.hpp(103) :
>> see reference to class template instantiation
>> 'luabind::detail::function_object_impl<F,Signature,Policies>' being
>> compiled
>> 1>          with
>> 1>          [
>> 1>              F=void (__thiscall TestOutPolicy::* )(const std::string
>> &,std::string &),
>> 1>              Signature=boost::mpl::vector4<void,TestOutPolicy &,const
>> std::string &,std::string &>,
>> 1>
>>
>> Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>
>> 1>          ]
>> 1>          c:\3rdparty\lua\luabind-0.9\luabind\class.hpp(312) : see
>> reference to function template instantiation 'luabind::adl::object
>>
>> luabind::make_function<F,boost::mpl::vector4<T0,T1,T2,T3>,Policies>(lua_State
>> *,F,Signature,Policies)' being compiled
>> 1>          with
>> 1>          [
>> 1>              F=void (__thiscall TestOutPolicy::* )(const std::string
>> &,std::string &),
>> 1>              T0=void,
>> 1>              T1=TestOutPolicy &,
>> 1>              T2=const std::string &,
>> 1>              T3=std::string &,
>> 1>
>>
>> Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>,
>> 1>              Signature=boost::mpl::vector4<void,TestOutPolicy &,const
>> std::string &,std::string &>
>> 1>          ]
>> 1>          c:\3rdparty\lua\luabind-0.9\luabind\class.hpp(310) : while
>> compiling class template member function 'void
>> luabind::detail::memfun_registration<Class,F,Policies>::register_(lua_State
>> *) const'
>> 1>          with
>> 1>          [
>> 1>              Class=TestOutPolicy,
>> 1>              F=void (__thiscall TestOutPolicy::* )(const std::string
>> &,std::string &),
>> 1>
>>
>> Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>
>> 1>          ]
>> 1>          c:\3rdparty\lua\luabind-0.9\luabind\class.hpp(828) : see
>> reference to class template instantiation
>> 'luabind::detail::memfun_registration<Class,F,Policies>' being compiled
>> 1>          with
>> 1>          [
>> 1>              Class=TestOutPolicy,
>> 1>              F=void (__thiscall TestOutPolicy::* )(const std::string
>> &,std::string &),
>> 1>
>>
>> Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>
>> 1>          ]
>> 1>          c:\3rdparty\lua\luabind-0.9\luabind\class.hpp(585) : see
>> reference to function template instantiation 'luabind::class_<T>
>> &luabind::class_<T>::virtual_def<F,DefaultOrPolicies>(const char *,const
>> F
>> &,const Policies &,luabind::detail::null_type,boost::mpl::true_)' being
>> compiled
>> 1>          with
>> 1>          [
>> 1>              T=TestOutPolicy,
>> 1>              F=void (__thiscall TestOutPolicy::* )(const std::string
>> &,std::string &),
>> 1>
>>
>> DefaultOrPolicies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>,
>> 1>
>>
>> Policies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>
>> 1>          ]
>> 1>          c:\src\kernel\TestOutPolicy.cpp(64) : see reference to
>> function template instantiation 'luabind::class_<T>
>> &luabind::class_<T>::def<void(__thiscall TestOutPolicy::* )(const
>> std::string &,std::string
>> &),luabind::detail::policy_cons<H,luabind::detail::null_type>>(const
>> char
>> *,F,DefaultOrPolicies)' being compiled
>> 1>          with
>> 1>          [
>> 1>              T=TestOutPolicy,
>> 1>
>> H=luabind::detail::out_value_policy<3,luabind::detail::null_type>,
>> 1>              F=void (__thiscall TestOutPolicy::* )(const std::string
>> &,std::string &),
>> 1>
>>
>> DefaultOrPolicies=luabind::detail::policy_cons<luabind::detail::out_value_policy<3,luabind::detail::null_type>,luabind::detail::null_type>
>> 1>          ]
>> 1>c:\3rdparty\lua\luabind-0.9\luabind\out_value_policy.hpp(78): error
>> C2784: 'luabind::detail::char_array<sizeof(identity<T>::type)>
>>
>> luabind::detail::indirect_sizeof_test(luabind::detail::by_const_pointer<T>)'
>> : could not deduce template argument for
>> 'luabind::detail::by_const_pointer<T>' from
>> 'luabind::detail::by_reference<T>'
>> 1>          with
>> 1>          [
>> 1>              T=std::string
>> 1>          ]
>> 1>          c:\3rdparty\lua\luabind-0.9\luabind\out_value_policy.hpp(68)
>> :
>> see declaration of 'luabind::detail::indirect_sizeof_test'
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> This SF.net email is sponsored by Sprint
>> What will you do first with EVO, the first 4G phone?
>> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>> _______________________________________________
>> luabind-user mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/luabind-user
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
>
> ------------------------------
>
> _______________________________________________
> luabind-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/luabind-user
>
>
> End of luabind-user Digest, Vol 49, Issue 4
> *******************************************
>



------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: VC10 and out_value policy compile issues

Felipe Magno de Almeida
On Mon, Jul 12, 2010 at 8:33 AM,  <[hidden email]> wrote:
> Thx Max,
>
> You are correct, I had a _2 before, and just changed to the _3 to make
> sure I wasn't over looking something and forgot to change that back. I
> found a work around for now but I'm still getting the error on compiling
> in VS 2010. This may be some quirky problem with 2010 I'm not sure, as
> soon as I find the solution I will post it up here.


I'm having the exact same problem. It works fine with primitives, but
std::string
fails when using pure_out_value.

[snip]
--
Felipe Magno de Almeida

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: VC10 and out_value policy compile issues

Felipe Magno de Almeida
In reply to this post by me-98
On Mon, Jul 12, 2010 at 8:33 AM,  <[hidden email]> wrote:
> Thx Max,
>
> You are correct, I had a _2 before, and just changed to the _3 to make
> sure I wasn't over looking something and forgot to change that back. I
> found a work around for now but I'm still getting the error on compiling
> in VS 2010. This may be some quirky problem with 2010 I'm not sure, as
> soon as I find the solution I will post it up here.


I'm having the exact same problem. It works fine with primitives, but
std::string fails when using pure_out_value. What is your workaround
for pure_out_value in VS 2010?

[snip]
--
Felipe Magno de Almeida

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself;
WebMatrix provides all the features you need to develop and
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: VC10 and out_value policy compile issues

Felipe Magno de Almeida
On Mon, Apr 4, 2011 at 7:21 AM, Felipe Magno de Almeida
<[hidden email]> wrote:

> On Mon, Jul 12, 2010 at 8:33 AM,  <[hidden email]> wrote:
>> Thx Max,
>>
>> You are correct, I had a _2 before, and just changed to the _3 to make
>> sure I wasn't over looking something and forgot to change that back. I
>> found a work around for now but I'm still getting the error on compiling
>> in VS 2010. This may be some quirky problem with 2010 I'm not sure, as
>> soon as I find the solution I will post it up here.
>
>
> I'm having the exact same problem. It works fine with primitives, but
> std::string fails when using pure_out_value. What is your workaround
> for pure_out_value in VS 2010?

I found out one way to make it compile. The problem seems to be that
VS 2010 isn't able to instantiate identity in this context:

template<class U>
char_array<sizeof(typename identity<U>::type)>
indirect_sizeof_test(by_reference<U>);

With any of the overloads. There's a workaround just above this to
deal with GCC 3.1 (I think) where it doesn't use identity, but U
directly. I added MSVC with MSC_VER == 1600 and it worked.

> [snip]
> --
> Felipe Magno de Almeida
>



--
Felipe Magno de Almeida

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Loading...