Open lsproule opened 7 months ago
Hey, so I am writing this code I have already done a
sol::state lua
then I am trying to add these user types. The strange thing is it compiles on another machine, but it doesn't compile on my machine. We know we have the exact same code because I am on the exact same branch as him. We were wondering what could be the cause of this issue.
Looks like the same issue as this https://github.com/ThePhD/sol2/issues/1565
I have the same exact issue when compiling my game engine with clang-18, everything worked fine with clang-17. I'm using Lua 5.4 (latest) and the latest version of Sol2 (develop branch). This happens when exposing a member variable directly. Maybe using sol::property instead could be a viable workaround, but in this case I have tons of code to rewrite. Is this going to be fixed?
I have the same exact issue when compiling my game engine with clang-18, everything worked fine with clang-17
Is Clang 18 released yet? Looks to me like 17 is latest here, which would indicate that 18 is still under development. If clang 18 is in development, then it only makes sense that there could be issues in its unreleased versions.
I have tons of code to rewrite
You can try this workaround from the ticket I linked above to see if it helps you https://github.com/ThePhD/sol2/issues/1565#issuecomment-1858900802
Is this going to be fixed?
A proper fix might need to be done in Clang itself. If I am right on what is causing this issue (the noexcept on the call function) then to me it seems like a compiler issue, not library issue.
Thanks, got it. I built LLVM-18 from their main branch two days ago, it's not tagged yet, anyway I'm sticking to 17 for now. I looked at the code and I think you're right, the standard allows conversion from non-throwing function pointer to potentially throwing function pointer (just not the other way round). This clearly should not be an error.