diff --git a/include/nlohmann/detail/conversions/from_json.hpp b/include/nlohmann/detail/conversions/from_json.hpp index 34a9c327e..ca16c7112 100644 --- a/include/nlohmann/detail/conversions/from_json.hpp +++ b/include/nlohmann/detail/conversions/from_json.hpp @@ -14,7 +14,11 @@ #include // valarray #ifdef JSON_HAS_CPP_17 - #include // optional + #if __has_include() + #include + #elif __has_include() + #include + #endif #endif #include diff --git a/include/nlohmann/detail/conversions/to_json.hpp b/include/nlohmann/detail/conversions/to_json.hpp index 040ba795f..e9a0f6471 100644 --- a/include/nlohmann/detail/conversions/to_json.hpp +++ b/include/nlohmann/detail/conversions/to_json.hpp @@ -11,7 +11,11 @@ #include // vector #ifdef JSON_HAS_CPP_17 - #include // optional + #if __has_include() + #include + #elif __has_include() + #include + #endif #endif #include diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 8cfebd025..ba2575b62 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -70,7 +70,11 @@ SOFTWARE. #include // valarray #ifdef JSON_HAS_CPP_17 - #include // optional + #if __has_include() + #include + #elif __has_include() + #include + #endif #endif // #include @@ -3292,7 +3296,11 @@ constexpr const auto& from_json = detail::static_const::va #include // vector #ifdef JSON_HAS_CPP_17 - #include // optional + #if __has_include() + #include + #elif __has_include() + #include + #endif #endif // #include