We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ThePhD
Learn more about funding links in repositories.
Report abuse
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
Class:
template<typename T> struct Test { T x; }; template <typename T> using OtherTest = Test<T>;
Binding:
auto bindTest = [this] <template <typename> class C1, typename C2> (const std::string& name) { this->state.new_usertype<C1<C2>> (name, "x", &C1<C2>::x); }; bindTest.operator()<Test, int> ("Test"); bindTest.operator()<OtherTest, int> ("OtherTest"); bindTest.operator()<Test, float> ("Testf"); bindTest.operator()<OtherTest, float> ("OtherTestf");
Script:
test1 = Test.new() test1.x = 10
Error:
attempt to index a sol.Lua::Test<int> value (global 'test1')
Note that if I remove either of T = float uses
bindTest.operator()<Test, float> ("Testf"); bindTest.operator()<OtherTest, float> ("OtherTestf");
or alias bindings
bindTest.operator()<OtherTest, int> ("OtherTest"); bindTest.operator()<OtherTest, float> ("OtherTestf");
then the script works fine.
Lua 5.4.7, Sol 3.2.3
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Class:
Binding:
Script:
Error:
Note that if I remove either of T = float uses
or alias bindings
then the script works fine.
Lua 5.4.7, Sol 3.2.3
The text was updated successfully, but these errors were encountered: