Skip to content

Commit

Permalink
🏁 include right <optional> header
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed May 17, 2020
1 parent 007c6c4 commit f25bf31
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/src/unit-conversions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f25bf31

Please sign in to comment.