-
-
Notifications
You must be signed in to change notification settings - Fork 509
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
Emscripten/Clang error on setting usertype member variable #1565
Comments
@RobbinMarcus Have you had success with lua itself only (no sol)? |
Yes, running Emscripten with various distributions of Lua has worked out great so far! |
Hmm, my guess is that the noexcept here However, if I understand correctly, it should not be a problem in Cpp17 (link). Emphasis mine.
So maybe it is a problem in the compiler toolchain not supporting this? |
Thank you so much for that! Removing the noexcept on lines 363 and 323 in This solves my problem so I'll close this issue. I haven't run into any issues using any other Sol2 functionality so far on Emscripten (after some brief test runs), so if anyone is thinking about this combo be sure to give it a try with the changes mentioned above! |
In sol/function_types_stateless.hpp, removed noexcept on lines 323 & 363. ThePhD/sol2#1565 (comment)
Compiling this simple example for emscripten:
Results in the following error:
I'm hoping you could help me out with some suggestions. I've tried the following:
-frelaxed-template-template-args
compiler flags for clang. This seems to have no effect.template<T>
tousing template_t = template<T>
. I tried a couple of these but I'm in over my head and it seemed to have no effect either.Reproducing:
Combine them using this cmake file:
Then build for emscripten (using their sdk for emcmake) using:
EMCC version:
Edit: for anyone trying to use properties like above: the example compiles, but it's not functional. I have found no workaround other than polymorphism to add property functions to the type.
The text was updated successfully, but these errors were encountered: