🏁 fix <optional> inclusion

This commit is contained in:
Niels Lohmann 2019-11-23 13:29:47 +01:00
parent df30a0ea07
commit 1359c56137
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
3 changed files with 20 additions and 4 deletions

View File

@ -14,7 +14,11 @@
#include <valarray> // valarray
#ifdef JSON_HAS_CPP_17
#include <optional> // optional
#if __has_include(<optional>)
#include <optional>
#elif __has_include(<experimental/optional>)
#include <experimental/optional>
#endif
#endif
#include <nlohmann/detail/exceptions.hpp>

View File

@ -11,7 +11,11 @@
#include <vector> // vector
#ifdef JSON_HAS_CPP_17
#include <optional> // optional
#if __has_include(<optional>)
#include <optional>
#elif __has_include(<experimental/optional>)
#include <experimental/optional>
#endif
#endif
#include <nlohmann/detail/iterators/iteration_proxy.hpp>

View File

@ -70,7 +70,11 @@ SOFTWARE.
#include <valarray> // valarray
#ifdef JSON_HAS_CPP_17
#include <optional> // optional
#if __has_include(<optional>)
#include <optional>
#elif __has_include(<experimental/optional>)
#include <experimental/optional>
#endif
#endif
// #include <nlohmann/detail/exceptions.hpp>
@ -3292,7 +3296,11 @@ constexpr const auto& from_json = detail::static_const<detail::from_json_fn>::va
#include <vector> // vector
#ifdef JSON_HAS_CPP_17
#include <optional> // optional
#if __has_include(<optional>)
#include <optional>
#elif __has_include(<experimental/optional>)
#include <experimental/optional>
#endif
#endif
// #include <nlohmann/detail/iterators/iteration_proxy.hpp>