sol2/tests/regression_tests/simple/source/main.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

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[] = { &regression_1008, &regression_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;
}