From 97c8cbdaf5b52f8a66ee33b7b9654eec2d3a089f Mon Sep 17 00:00:00 2001 From: Ivan Shynkarenka Date: Fri, 2 Oct 2020 19:10:04 +0300 Subject: [PATCH 1/4] Fixed: Compile toml11 with MinGW cause error in #135 --- toml/parser.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toml/parser.hpp b/toml/parser.hpp index a52d8c9..1adef87 100644 --- a/toml/parser.hpp +++ b/toml/parser.hpp @@ -13,12 +13,12 @@ #include "types.hpp" #include "value.hpp" -#if __cplusplus >= 201703L +#if (__cplusplus >= 201703L) && !defined(__MINGW32__) && !defined(__MINGW64__) #if __has_include() #define TOML11_HAS_STD_FILESYSTEM #include #endif // has_include() -#endif // cplusplus >= C++17 +#endif // (cplusplus >= C++17) && !mingw32 && !mingw64 namespace toml { From f2d9fd1d1ff5385a34974c6f646c618b81eabeca Mon Sep 17 00:00:00 2001 From: Ivan Shynkarenka Date: Sat, 3 Oct 2020 22:36:59 +0300 Subject: [PATCH 2/4] Fixed: Compile toml11 with MinGW cause error in #136 --- toml/parser.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toml/parser.hpp b/toml/parser.hpp index 1adef87..4960dcb 100644 --- a/toml/parser.hpp +++ b/toml/parser.hpp @@ -13,12 +13,12 @@ #include "types.hpp" #include "value.hpp" -#if (__cplusplus >= 201703L) && !defined(__MINGW32__) && !defined(__MINGW64__) +#if (__cplusplus >= 201703L) || (__GNUC__ >= 9) #if __has_include() #define TOML11_HAS_STD_FILESYSTEM #include #endif // has_include() -#endif // (cplusplus >= C++17) && !mingw32 && !mingw64 +#endif // (cplusplus >= C++17) || (gcc >= 9) namespace toml { From 6e1e5ccd84cb0abb15c7b6dfe235058491d21207 Mon Sep 17 00:00:00 2001 From: Ivan Shynkarenka Date: Sat, 3 Oct 2020 23:06:47 +0300 Subject: [PATCH 3/4] Fixed: Compile toml11 with MinGW cause error in #136 --- toml/parser.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toml/parser.hpp b/toml/parser.hpp index 4960dcb..d685f00 100644 --- a/toml/parser.hpp +++ b/toml/parser.hpp @@ -13,12 +13,12 @@ #include "types.hpp" #include "value.hpp" -#if (__cplusplus >= 201703L) || (__GNUC__ >= 9) +#if (__GNUC__ >= 9) || (!defined(__GNUC__) && (__cplusplus >= 201703L)) #if __has_include() #define TOML11_HAS_STD_FILESYSTEM #include #endif // has_include() -#endif // (cplusplus >= C++17) || (gcc >= 9) +#endif // (gcc >= 9) || (!gcc && (cplusplus >= C++17)) namespace toml { From 5d8c573357cc65317baf8b2db059d3b016e7b8e1 Mon Sep 17 00:00:00 2001 From: Ivan Shynkarenka Date: Sat, 3 Oct 2020 23:16:58 +0300 Subject: [PATCH 4/4] Fixed: Compile toml11 with MinGW cause error in #136 --- toml/parser.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/toml/parser.hpp b/toml/parser.hpp index d685f00..f6d6374 100644 --- a/toml/parser.hpp +++ b/toml/parser.hpp @@ -13,12 +13,12 @@ #include "types.hpp" #include "value.hpp" -#if (__GNUC__ >= 9) || (!defined(__GNUC__) && (__cplusplus >= 201703L)) +#ifdef __cpp_lib_filesystem #if __has_include() #define TOML11_HAS_STD_FILESYSTEM #include #endif // has_include() -#endif // (gcc >= 9) || (!gcc && (cplusplus >= C++17)) +#endif // __cpp_lib_filesystem namespace toml {