sol2/tests/regression_tests/simple/source/1000 - readonly warning.cpp
ThePhD 000fa31809
Heavily improve usage of Preprocessor checks
- Weed out bugs in the numeric checking implementation
- Solve the problem with load_result/protected_function_result/unsafe_function_result being copyable and thus amenable to explosions. Fixes #995.
- Resolve the warning in sol::readonly. Fixes #1000.
- Looke into #1014. Not sure I can help there, honestly; looks like a mix up of multiply-loaded libraries and mixing the two.
2020-09-26 06:47:32 -04:00

21 lines
375 B
C++

#define SOL_ALL_SAFETIES_ON 1
#include <sol/sol.hpp>
struct foo1000 {
static void register_into(sol::table& table) {
table.new_usertype<foo1000>("foo1000", "id", sol::readonly(&foo1000::foo));
}
int foo;
};
int regression_1000() {
sol::state lua;
lua.create_named_table("t");
sol::table t = lua["t"];
foo1000::register_into(t);
return 0;
}