diff --git a/include/nlohmann/detail/macro_scope.hpp b/include/nlohmann/detail/macro_scope.hpp index 040e1b9a2..83d8e06b4 100644 --- a/include/nlohmann/detail/macro_scope.hpp +++ b/include/nlohmann/detail/macro_scope.hpp @@ -51,11 +51,11 @@ #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 #endif - //// std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/ - //#if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ == 8 - // #undef JSON_HAS_FILESYSTEM - // #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM - //#endif + // std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/ + #if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ == 8 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif #endif #endif diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 72be1389b..5be8bfa5d 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -2339,11 +2339,11 @@ using is_detected_convertible = #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 #endif - //// std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/ - //#if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ == 8 - // #undef JSON_HAS_FILESYSTEM - // #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM - //#endif + // std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/ + #if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ == 8 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif #endif #endif diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 197fb11ee..0ab021051 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -59,9 +59,9 @@ foreach(feature ${CMAKE_CXX_COMPILE_FEATURES}) endif() endforeach() # Clang only supports C++17 starting from Clang 5.0 -#if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) -# unset(compiler_supports_cpp_17) -#endif() +if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) + unset(compiler_supports_cpp_17) +endif() file(GLOB files src/unit-*.cpp) diff --git a/test/src/unit-regression2.cpp b/test/src/unit-regression2.cpp index 5e0f8f804..22c0154d3 100644 --- a/test/src/unit-regression2.cpp +++ b/test/src/unit-regression2.cpp @@ -62,11 +62,11 @@ using ordered_json = nlohmann::ordered_json; #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 #endif - //// std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/ - //#if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ == 8 - // #undef JSON_HAS_FILESYSTEM - // #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM - //#endif + // std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/ + #if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ == 8 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif #endif #endif