Sol v2.1.0
This release adds several features to sol for both safety and speed:
* the sol::stack::check_get
and additional safety features that can be turned on at request with SOL_CHECK_ARGUMENTS.
* An implementation of optional
into Sol to work with the said check_get API
* Check whether or not a proxy returned with operator[]
is a currently valid variable
// Check validity of proxy
auto x = table["x"];
if (x.valid()) {
// stuff here
}
// Optional support
sol::optional<int> maybe_x = table["x"];
if (maybe_x) {
my_value = *maybe_x;
}