Problem with tag_function

Gabriel Konat <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
I'm trying to use tag_function and boost::bind to fill in a default
parameter for a member function without using a wrapper function. This
work fine (compiles and runs) with the following code:

Luabind define: .def( "SetScale", tag_function<void(Visual&, const
Ogre::Vector3&)>( boost::bind( &Visual::setScale, _1, _2,
(RakNet::RPC3*)0 ) ) )
Function signature: void setScale( const Ogre::Vector3& rScale,
RakNet::RPC3* pRPC3 )

But when I try to do the same using another function I get a lot of errors.

Luabind define: .def( "SetPositionOffset", tag_function<void(Visual&,
const Ogre::Vector3&, const std::string&)>( boost::bind(
&Visual::setPositionOffset, _1, _2, _3, (RakNet::RPC3*)0 ) ) )
Function signature: void setPositionOffset( const Ogre::Vector3&
rOffset, const std::string& rEntityName, RakNet::RPC3* pRPC3 )

The main error I get is:
f:\multiversevs\svn\trunk\server\dependencies\includes\boost\bind\mem_fn_template.hpp(370)
: error C2440: 'argument' : cannot convert from 'const
MultiVerse::Server::Visual *' to 'MultiVerse::Server::Visual *const '
The rest of the errors can be found here: http://codepad.org/Cm2sMIgQ

I've tried a lot of things to fix this but I can't get it to compile
or run with the second function. I'm using luabind 0.8.1 and Visual
Studio 2008 SP1.
Does anyone know how to get this working?

Gabriel Konat

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
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.