mirror of
https://github.com/nlohmann/json.git
synced 2026-08-25 02:23:19 +00:00
🏁 include right <optional> header
This commit is contained in:
@@ -49,8 +49,15 @@ using nlohmann::json;
|
|||||||
#define JSON_HAS_CPP_14
|
#define JSON_HAS_CPP_14
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef JSON_HAS_CPP_17
|
||||||
|
#if __has_include(<optional>)
|
||||||
|
#include <optional>
|
||||||
|
#elif __has_include(<experimental/optional>)
|
||||||
|
#include <experimental/optional>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(JSON_HAS_CPP_17)
|
#if defined(JSON_HAS_CPP_17)
|
||||||
#include <optional>
|
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user