default argument support

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

default argument support

Jeremy Sandell
Hello,

    Does anyone know if there's any plan to support C++ functions that use default arguments in LuaBind? Boost.Python has this, though from what I understand it saves the name of the argument as well as the value, which I don't imagine Lua would need.

Thanks!
Jeremy Sandell

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user
Reply | Threaded
Open this post in threaded view
|

Re: default argument support

Ryan Pavlik-4


On Fri, Oct 14, 2011 at 3:00 PM, Jeremy Sandell <[hidden email]> wrote:
Hello,

    Does anyone know if there's any plan to support C++ functions that use default arguments in LuaBind? Boost.Python has this, though from what I understand it saves the name of the argument as well as the value, which I don't imagine Lua would need.

Thanks!
Jeremy Sandell

So default arguments for functions in C++ are strictly a compile-time phenomenon - this is the appropriate section of the boost python docs:

You can do the manual wrapping thing - that's what I've been doing. However, that macro and "def" overload looks handy and probably the only way to do this simply, so that might be something worth porting to luabind.

Here's what I've done in some cases to make the manual wrapping easier:


Ryan
 

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user




--
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

[hidden email]
http://academic.cleardefinition.com

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user