friendly state injection, sol::reference / sol::object and friends now take nil
This release is a small Quality of Implementation fix. sol::reference
and sol::object
(but not their derived types) accept nil/none as types now when passing from C++-bound Lua functions. This emulates the default behavior of how Lua functions work. It also contains minor fixes for const vs. nonconst size()
functions.
This release also allows you to call the same function sol2 uses to set up good default tracebacks and a proper default protected_function
error handler.
Docs: sol2.readthedocs.io/en/latest/api/state.html#sol-state-automatic-handlers
Example: https://github.com/ThePhD/sol2/blob/develop/examples/functions_empty_arguments.cpp