mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
000fa31809
- 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.
16 lines
440 B
C++
16 lines
440 B
C++
#include <cstddef>
|
|
|
|
extern int regression_1008();
|
|
extern int regression_1000();
|
|
|
|
int main(int, char*[]) {
|
|
using f_ptr = int (*)();
|
|
const f_ptr regressions[] = { ®ression_1008, ®ression_1000 };
|
|
const int sizeof_regressions = sizeof(regressions) / sizeof(regressions[0]);
|
|
int r = 0;
|
|
for (std::size_t i = 0; i < sizeof_regressions; ++i) {
|
|
f_ptr f = regressions[0];
|
|
r += static_cast<int>(f() != 0);
|
|
}
|
|
return r;
|
|
} |