Skip to content

Proper reference semantics for container access

Compare
Choose a tag to compare
@ThePhD ThePhD released this 05 Oct 05:01
· 1169 commits to develop since this release

This release fixes a minor bug with container access, where it pushes a copy rather than a reference to items in a container type bound on a usertype (oops).

The good news is, there's tests for all these now, so it'll never happen again.

protected_function now has a constructor that can take 2 Lua References. This means you can pass the function to grab and the error function as well. It is also important to note you can also use sol::protected_function::set_default_handler( lua["my_handler"] ); to have a perpetual default handler.

Finally, also fixed a bug where users member function call optimizations on a blank simple_usertype that was added to later would fail. Now it works properly.

constexpr was fixed and the size of sol::optional should be a bit smaller now. GCC 4.9 and less users will not get all the hot kinky constexpr optional, though: not like they can, because GCC 4.9 and below doesn't have relaxed constexpr in the first place...!