Commit cd7acc1d authored by Alexander Karzhenkov's avatar Alexander Karzhenkov

Include <string_view> in "nlohmann/json.hpp" when C++17 is used

parent 39b8d6bd
...@@ -73,6 +73,10 @@ SOFTWARE. ...@@ -73,6 +73,10 @@ SOFTWARE.
#include <nlohmann/json_fwd.hpp> #include <nlohmann/json_fwd.hpp>
#include <nlohmann/ordered_map.hpp> #include <nlohmann/ordered_map.hpp>
#if defined(JSON_HAS_CPP_17)
#include <string_view>
#endif
/*! /*!
@brief namespace for Niels Lohmann @brief namespace for Niels Lohmann
@see https://github.com/nlohmann @see https://github.com/nlohmann
......
...@@ -16663,6 +16663,10 @@ template <class Key, class T, class IgnoredLess = std::less<Key>, ...@@ -16663,6 +16663,10 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
} // namespace nlohmann } // namespace nlohmann
#if defined(JSON_HAS_CPP_17)
#include <string_view>
#endif
/*! /*!
@brief namespace for Niels Lohmann @brief namespace for Niels Lohmann
@see https://github.com/nlohmann @see https://github.com/nlohmann
......
...@@ -48,10 +48,6 @@ using nlohmann::json; ...@@ -48,10 +48,6 @@ using nlohmann::json;
#define JSON_HAS_CPP_14 #define JSON_HAS_CPP_14
#endif #endif
#if defined(JSON_HAS_CPP_17)
#include <string_view>
#endif
TEST_CASE("value conversion") TEST_CASE("value conversion")
{ {
SECTION("get an object (explicit)") SECTION("get an object (explicit)")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment