sol::object in_place constructor, better examples
All of the examples in the examples directory got beefed up and reworked, to better show how to use sol2. We also improved performance for the related benchmarks and also benchmark against the old sol2.
There is tentative support (but currently undocumented) for automatically looking up base class variables on metatables. It is currently not recommended because there is a significant overhead in non-trivial cases: the recommendation in the docs to continue specifying all member functions / variables -- including base ones -- stays for now, and this will remain undocumented until the speed becomes less shit.
The addition of sol::factories( ... )
for usertypes, to allow people to specify a factory function without automatically getting a new
function.
Support for std::wstring
, std::u16string
, std::u32string
by converting them to std::string
's and serializing them into Lua as utf8, before deserializing them into whatever target string based on what someone does a get
/set
with.
sol::object
now has an in_place
and in_place<T>
constructor, to create arbitrary objects. This supersedes make_object
, but both will continue to be present.
Many small bugs were also fixed, including some const-ness issues and some return type issues for sol::reference
derived types (thanks to @Nava2 for reporting!).
Unless a new feature appears, this is possibly the latest and greatest version of sol2
.