Re: weak_ref issue patch

Christian <[email protected]> Tue, 23 Jul 2013 10:55:33 +0200
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <2000196.LFv4PS6CWz@cn-0-u>
On Tuesday 23 July 2013, at 10:11:13, Glen Fraser <[email protected]> wrote:
> How embarrassing, sorry for the noise, I was barking up the wrong tree. 
> This turned out to be (of course) a stupid change where I was including
> adopt_policy.hpp before luabind.hpp -- doh!
> 
> Sorry.
> 
> Now, when I try to use the adopt policy, I get errors like Sympaval had (in
> this thread:
> http://lua.2524044.n2.nabble.com/Remove-an-object-from-the-lua-state-tp7583
> 423p7583425.html).  He didn't manage to get adopt working when binding, but
> rather chose to instead use it with using call_function.
> 
> Same as him -- I get errors like this, when trying to use adopt(_2) in a
> def():
> 
> .../boost/include/boost/preprocessor/iteration/detail/local.hpp:37:9: No
> member named 'consumed_args' in 'luabind::detail::adopt_policy<2,
> void>::only_accepts_nonconst_pointers'
> .../boost/include/boost/preprocessor/iteration/detail/local.hpp:37:9: No
> member named 'converter_postcall' in 'luabind::detail::adopt_policy<2,
> void>::only_accepts_nonconst_pointers'
> .../addons/ofxLua/src/luabind/luabind/detail/call.hpp:295:48: No member
> named 'apply' in 'luabind::detail::adopt_policy<2,
> void>::only_accepts_nonconst_pointers'
> 
> And when I try to use it with call_function:
> 
> .../addons/ofxLua/src/luabind/luabind/detail/call_function.hpp:200:20: No
> member named 'match' in 'luabind::detail::adopt_policy<0,
> void>::only_accepts_nonconst_pointers'
> 

The struct name "only_accepts_nonconst_pointers" is meant as an error message:
adopt only works with non-const pointers (meaning that the adopted type must 
be both a pointer and a non-const one).

Hope I could help,
Christian

> Is this because the latest luabind requires C++0x/C++11 compilation and
> standard libs?  Currently, I can't do that because I'm using it inside
> OpenFrameworks v0074, which still uses std::tr1 things -- but I guess I can
> try to change that locally (if that's the solution).  Or should I go back
> to an older version of luabind?
> 
> Thanks again (though I feel like I'm talking to myself ;-),
> Glen.

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk