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

pull/2540/head
Alexander Karzhenkov 2020-12-20 19:40:36 +05:00
parent 39b8d6bd33
commit cd7acc1dc5
3 changed files with 8 additions and 4 deletions

View File

@ -73,6 +73,10 @@ SOFTWARE.
#include <nlohmann/json_fwd.hpp>
#include <nlohmann/ordered_map.hpp>
#if defined(JSON_HAS_CPP_17)
#include <string_view>
#endif
/*!
@brief namespace for Niels Lohmann
@see https://github.com/nlohmann

View File

@ -16663,6 +16663,10 @@ template <class Key, class T, class IgnoredLess = std::less<Key>,
} // namespace nlohmann
#if defined(JSON_HAS_CPP_17)
#include <string_view>
#endif
/*!
@brief namespace for Niels Lohmann
@see https://github.com/nlohmann

View File

@ -48,10 +48,6 @@ using nlohmann::json;
#define JSON_HAS_CPP_14
#endif
#if defined(JSON_HAS_CPP_17)
#include <string_view>
#endif
TEST_CASE("value conversion")
{
SECTION("get an object (explicit)")