diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index a726d1adf..8c9bef03d 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -73,6 +73,10 @@ SOFTWARE. #include #include +#if defined(JSON_HAS_CPP_17) + #include +#endif + /*! @brief namespace for Niels Lohmann @see https://github.com/nlohmann diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 88c8fa74d..9e6f6012d 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -16663,6 +16663,10 @@ template , } // namespace nlohmann +#if defined(JSON_HAS_CPP_17) + #include +#endif + /*! @brief namespace for Niels Lohmann @see https://github.com/nlohmann diff --git a/test/src/unit-conversions.cpp b/test/src/unit-conversions.cpp index c71e230d9..16c4f798e 100644 --- a/test/src/unit-conversions.cpp +++ b/test/src/unit-conversions.cpp @@ -48,10 +48,6 @@ using nlohmann::json; #define JSON_HAS_CPP_14 #endif -#if defined(JSON_HAS_CPP_17) - #include -#endif - TEST_CASE("value conversion") { SECTION("get an object (explicit)")