mirror of
https://github.com/nlohmann/json.git
synced 2025-06-12 10:42:52 +08:00
Include <string_view> in "nlohmann/json.hpp" when C++17 is used
This commit is contained in:
parent
39b8d6bd33
commit
cd7acc1dc5
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)")
|
||||
|
Loading…
Reference in New Issue
Block a user