-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Template Constructor / Members / Functions #27
Comments
I'm sorry, i dont understand. |
For example if we have a simple function which add two things : That I can use like the following : I can't do that in kaguya : I can do this : But I'll have to specify each type I want to use, is it possible to pass the entire function and use all the possible types in Lua ? |
Can not it. Instantiate of C++ template is compile time only. That you can is below only. kaguya::overload(
//List the type that might be used
addStuff<int>,
addStuff<std::string>,
addStuff<my_class>,
addStuff<my_other_class>); |
I understand :) Thanks anyway ! |
Do you plan to add support for templates when adding constructor, members or functions to a ClassMetatable ?
It works when you specify the type but could it be possible to leave the type empty and let Lua use any type ?
The text was updated successfully, but these errors were encountered: