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
Why we can't pass nil to std::shared_ptr without registering a new overload. This behavior used to work previously according to my old tests, not anymore.
Consider this example:
[sol2] An error occurred and has been passed to an error handler: sol: runtime error: stack index 1, expected userdata, received nil: value is not a userdata (bad argument into 'void(std::shared_ptr<Test>)')
stack traceback:
[C]: in function 'base.f'
[string "f(nil)"]:1: in main chunk
terminate called after throwing an instance of 'sol::error'
what(): sol: runtime error: stack index 1, expected userdata, received nil: value is not a userdata (bad argument into 'void(std::shared_ptr<Test>)')
stack traceback:
[C]: in function 'base.f'
[string "f(nil)"]:1: in main chunk
Program terminated with signal: SIGSEGV
Why we can't pass
nil
tostd::shared_ptr
without registering a new overload. This behavior used to work previously according to my old tests, not anymore.Consider this example:
Throws this error:
@ThePhD Any thoughts?
The text was updated successfully, but these errors were encountered: