sol2 icon indicating copy to clipboard operation
sol2 copied to clipboard

Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:

Results 286 sol2 issues
Sort by recently updated
recently updated
newest added

1. Repro ```C++ #define SOL_ALL_SAFETIES_ON 1 #include struct ClassA { virtual ~ClassA() = default; static std::shared_ptr makeShared() { return std::make_shared(); } }; class ClassB { }; int main() { sol::state...

I am writing some code to convert a sol::table into a C++ structure, and I want to prevent infinite recursive loops from forming when a table has itself somewhere in...

I have a function like this: ```c++ void f(std::optional x); ``` The intent is that it can be called from Lua with or without an argument. So this works: ```lua...

Hi, I am looking to decrease the size of executables generated with sol2 which map some C++ interfaces to Lua. I am currently limited to using C++14, therefore I am...

I am working on Fedora 37 using gcc 12.3.1 and lua 5.4.6. The following code works as expected with sol v 3.2.3. #include "TestClass.h" #define SOL_ALL_SAFETIES_ON 1 #include "sol/sol.hpp" #include...

I need a way to somehow make it so that all tables and functions, except for one global variable is a noop operation. I have created a usertype with metatable...

Consider when bindings with libraries which are standard STL drop in replacements like for instance: `EASTL`, `Boost`... `usertype_container_default` is tightly dependent on `std::input_iterator_tag`/`std::random_access_iterator_tag`, but for instance `EASTL` has its own...

Minimal repro: ```C++ #define SOL_ALL_SAFETIES_ON 1 #include #include #include using std::string; using std::string_view; string gValueString; string_view gValueStringView; void register_tests(sol::state_view& state) { state["gValueString"] = sol::var(gValueString); state["gValueStringView"] = sol::var(gValueStringView); } // int...

Fixes #1514. The documentation might need a rebuild. Currently, I don't have the setup to do that 😄

Assuming I have a function like this: ```cpp sol::state_view state(luaState); state["test_fn"] = [](bool value) { if (!value) { // How can fail here without throwing exception? } }; ``` How...