Re: tag_function<> under class_ gives me error C2825
Max McGuire <[email protected]>
| Newsgroups | gmane.comp.lang.lua.bind.user |
|---|---|
| Message-ID | <[email protected]> |
It looks like: boost::bind(&LuaHelper::SetExpression, this, _1) Should be: boost::bind(&LuaHelper::SetExpression, this, _1, _2) Max -- Technical Director Unknown Worlds Entertainment http://www.unknownworlds.com On Sat, Jul 3, 2010 at 6:11 AM, Kristoffer Danielsson < [email protected]> wrote: > Latest Luabind 0.9, VC10. > > > namespace LuaHelper > { > inline void SetExpression(Script *pScript, boost::RegEx &r, const char* > s) { ... } > } > > Inside Script class: > luabind::module(L) > [ > luabind::class_<boost::RegEx>("Regex") > .def("SetExpression", luabind::tag_function<void(boost::RegEx&, const > char*)>(boost::bind(&LuaHelper::SetExpression, this, _1))) > ]; > > When compiling I get this error: > > 1>c:\program files (x86)\boost\boost_1_42\boost\bind\bind.hpp(69): error > C2825: 'F': must be a class or namespace when followed by '::' > 1> c:\program files > (x86)\boost\boost_1_42\boost\bind\bind_template.hpp(15) : see reference to > class template instantiation 'boost::_bi::result_traits<R,F>' being compiled > 1> with > 1> [ > 1> R=boost::_bi::unspecified, > 1> F=void (__cdecl *)(Script *,boost::RegEx &,const char *) > 1> ] > 1> c:\users\me\desktop\testapp2010\testapp\script.cpp(365) : see > reference to class template instantiation 'boost::_bi::bind_t<R,F,L>' being > compiled > 1> with > 1> [ > 1> R=boost::_bi::unspecified, > 1> F=void (__cdecl *)(Script *,boost::RegEx &,const char *), > 1> L=boost::_bi::list2<boost::_bi::value<Script > *>,boost::arg<1>> > 1> ] > > > I've tried to reorder the parameters, using _2 instead of _1 etc, but with > no success. I've managed to do this with global functions, but inside > classes I get this problem! > > > What am I doing wrong? > > Thank you for your help! > > ------------------------------ > Kom närmare dina vänner. Chatta och dela upplevelser med Messenger! Testa > din dator här!<http://channels.se.msn.com/channelizers/IE_skvallerbyttan.aspx> > > > ------------------------------------------------------------------------------ > 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 > [email protected] > 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 [email protected] https://lists.sourceforge.net/lists/listinfo/luabind-user