mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
14 lines
250 B
C++
14 lines
250 B
C++
|
#define SOL_ALL_SAFETIES_ON 1
|
||
|
|
||
|
#include <sol/sol.hpp>
|
||
|
|
||
|
int regression_1067() {
|
||
|
sol::state lua;
|
||
|
|
||
|
lua.open_libraries(sol::lib::base);
|
||
|
lua["fct"] = std::function<int()> { []() { return 42; } };
|
||
|
lua.script("print(fct())");
|
||
|
|
||
|
return 0;
|
||
|
}
|