Skip the std::filesystem test section on libstdc++ 8

libstdc++ 8 needs -lstdc++fs, which clang on that library does not get
from the test options (clang 10 link error in ci_test_compilers_clang).

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann committed 2026-11-17 17:19:51 +01:00
1 parent 934b12a9e1
commit 041af50512
1 file changed
+3 -1
+3 -1
View File
@@ -32,7 +32,9 @@ using nlohmann::json;
// JSON_HAS_CPP_17 (do not remove; see note at top of file)
#if (defined(__cplusplus) && __cplusplus >= 201703L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1)
#if __has_include(<filesystem>)
// libstdc++ 8 needs -lstdc++fs for std::filesystem (GCC bug 90050), which clang on such a
// libstdc++ does not get from the test options
#if __has_include(<filesystem>) && (!defined(_GLIBCXX_RELEASE) || _GLIBCXX_RELEASE >= 9)
#include <filesystem>
#define TO_JSON_RVALUE_HAS_FS 1
#endif