We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
sol::table
usertype
Currently, sol fails to pass a sol::table as a parameter to a usertype.
sol
Minimum example:
class Foo { public: Foo(sol::table /*table*/) { } }; int main() { sol::state lua; lua.new_usertype<Foo, sol::table>("Foo"); lua.script("a = Foo.new { a = \"wat\" }"); }
The error message is: lua: error: No matching constructor for the arguments provided
lua: error: No matching constructor for the arguments provided
The text was updated successfully, but these errors were encountered:
Interestingly, this works fine:
_lua.set_function("test_table", [](sol::table table) { std::string a = table["a"]; std::cout << "table.a = " << a << std::endl; }); _lua.script("test_table { a = \"wat\" }");
Sorry, something went wrong.
There was a bug in the logic for detecting whether or not a table was called with .new versus :new. This is fixed in sol2.
.new
:new
sol2
No branches or pull requests
Currently,
sol
fails to pass asol::table
as a parameter to ausertype
.Minimum example:
The error message is:
lua: error: No matching constructor for the arguments provided
The text was updated successfully, but these errors were encountered: