mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
15 lines
391 B
C++
15 lines
391 B
C++
|
#include <cstddef>
|
||
|
|
||
|
extern int regression_1008();
|
||
|
|
||
|
int main(int, char*[]) {
|
||
|
using f_ptr = int (*)();
|
||
|
const f_ptr regressions[] = { ®ression_1008 };
|
||
|
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;
|
||
|
}
|