🏁 include right <optional> header

This commit is contained in:
Niels Lohmann 2020-05-17 13:58:09 +02:00
parent 007c6c4bc5
commit f25bf312fc
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69

View File

@ -49,8 +49,15 @@ using nlohmann::json;
#define JSON_HAS_CPP_14
#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)
#include <optional>
#include <string_view>
#endif