Filters, Garbage Collection, and Automatic Usertype improvements
This is an important bugfix release that fixes some garbage collection errors in simple_usertype
and solves a variety of bugs. It also introduces a new modifer on functions and arguments to C/C++ function calls called "filters", similar to luabind's reference_to and policies. sol2 should now be nearly 100% feature-parity with luabind.
Happy porting!
Features:
- sol::filters abstraction -- thanks to @mrgreywater and @OrfeasZ for the bikeshedding and help in developing this feature. Implements #472.
__tostring
metamethods are now generated fromoperator<<
,to_string(obj)
, orobj.to_string()
calls
Fixes:
- Android not putting its math functions in the
std::
namespace for some reason: #488 - Bogus alignment errors: #487 (also fixed by upgrading VS2017 to its latest version)
- Add explanations to heap space errors: #496 (http://sol2.readthedocs.io/en/latest/errors.html#compiler-out-of-heap-space)
- Fix issues with indestructible types and virtual destructor types: #492
- Garbage collection issues: #489 #490 #491
- Garbage collection is now applied to types even if someone does not specify a usertype for it. If the type is non-destructible, it will plant an erroring garbage collection function warning you of undefined behavior if you do not register a usertype in time to handle it