Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lemire committed Jan 28, 2024
1 parent 1d97749 commit 5334e2b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ fast_float_add_cpp_test(long_test)
fast_float_add_cpp_test(powersoffive_hardround)
fast_float_add_cpp_test(string_test)
fast_float_add_cpp_test(fast_int)
target_compile_features(fast_int PRIVATE cxx_std_17)
fast_float_add_cpp_test(json_fmt)
fast_float_add_cpp_test(fortran)

Expand Down
9 changes: 8 additions & 1 deletion tests/fast_int.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if defined(__cplusplus) && (__cplusplus >= 201703L)
#include <cstdlib>
#include <iostream>
#include <vector>
Expand Down Expand Up @@ -741,4 +742,10 @@ int main() {
}

return EXIT_SUCCESS;
}
}
#else
int main() {
std::cerr << "The test requires C++17." << std::endl;
return EXIT_SUCCESS;
}
#endif

0 comments on commit 5334e2b

Please sign in to comment.