diff --git a/include/nlohmann/detail/conversions/from_json.hpp b/include/nlohmann/detail/conversions/from_json.hpp index ca16c7112..28b10486a 100644 --- a/include/nlohmann/detail/conversions/from_json.hpp +++ b/include/nlohmann/detail/conversions/from_json.hpp @@ -13,14 +13,6 @@ #include // pair, declval #include // valarray -#ifdef JSON_HAS_CPP_17 - #if __has_include() - #include - #elif __has_include() - #include - #endif -#endif - #include #include #include diff --git a/include/nlohmann/detail/conversions/to_json.hpp b/include/nlohmann/detail/conversions/to_json.hpp index e9a0f6471..466683363 100644 --- a/include/nlohmann/detail/conversions/to_json.hpp +++ b/include/nlohmann/detail/conversions/to_json.hpp @@ -10,14 +10,6 @@ #include // valarray #include // vector -#ifdef JSON_HAS_CPP_17 - #if __has_include() - #include - #elif __has_include() - #include - #endif -#endif - #include #include #include diff --git a/include/nlohmann/detail/macro_scope.hpp b/include/nlohmann/detail/macro_scope.hpp index 27dddc6be..16200502b 100644 --- a/include/nlohmann/detail/macro_scope.hpp +++ b/include/nlohmann/detail/macro_scope.hpp @@ -27,6 +27,14 @@ #define JSON_HAS_CPP_14 #endif +#ifdef JSON_HAS_CPP_17 + #if __has_include() + #include + #elif __has_include() + #include + #endif +#endif + // disable float-equal warnings on GCC/clang #if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) #pragma GCC diagnostic push diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index ba2575b62..4cd8ed9fc 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -69,14 +69,6 @@ SOFTWARE. #include // pair, declval #include // valarray -#ifdef JSON_HAS_CPP_17 - #if __has_include() - #include - #elif __has_include() - #include - #endif -#endif - // #include @@ -1739,6 +1731,14 @@ JSON_HEDLEY_DIAGNOSTIC_POP #define JSON_HAS_CPP_14 #endif +#ifdef JSON_HAS_CPP_17 + #if __has_include() + #include + #elif __has_include() + #include + #endif +#endif + // disable float-equal warnings on GCC/clang #if defined(__clang__) || defined(__GNUC__) || defined(__GNUG__) #pragma GCC diagnostic push @@ -3295,14 +3295,6 @@ constexpr const auto& from_json = detail::static_const::va #include // valarray #include // vector -#ifdef JSON_HAS_CPP_17 - #if __has_include() - #include - #elif __has_include() - #include - #endif -#endif - // #include