You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exe
=> lua-5.4.6 (static .lib)
=> lua-base (dynamic .dll) -> Includes sol and defines a bunch of usertypes with base/derived classes
=> class A;
=> class B : A;
=> SomePlugin (dynamic .dll) -> Provides some additional functions via sol (also includes sol.hpp), and uses the usertypes from lua-base
If "SomePlugin" now tries to call table.get<A>("example"), and in lua we did myTable["example"] = B::create(), the call of .get<A>(...)will fail as the check whether A is derived from B always fails.
As a workaround, adding SOL_DERIVED_CLASSES(A, B) and including that in "SomePlugin"'s code will fix the issue.
Therefore it would be great to mention this in the documentation, as finding it on your own is non-trivial :)
The text was updated successfully, but these errors were encountered:
I'm having the following project structure:
If "SomePlugin" now tries to call
table.get<A>("example")
, and in lua we didmyTable["example"] = B::create()
, the call of.get<A>(...)
will fail as the check whether A is derived from B always fails.As a workaround, adding
SOL_DERIVED_CLASSES(A, B)
and including that in "SomePlugin"'s code will fix the issue.Therefore it would be great to mention this in the documentation, as finding it on your own is non-trivial :)
The text was updated successfully, but these errors were encountered: