From eeb48dd0a7874616e3b4540fb3c89f8bfa6835e8 Mon Sep 17 00:00:00 2001 From: David Pfahler Date: Mon, 31 May 2021 14:27:23 +0200 Subject: [PATCH] fixed amalgation file for #2728 --- single_include/nlohmann/json.hpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 0f3d3b064..e9664f255 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -38,7 +38,9 @@ SOFTWARE. #include // nullptr_t, ptrdiff_t, size_t #include // hash, less #include // initializer_list -#include // istream, ostream +#ifndef JSON_NO_IO + #include // istream, ostream +#endif // JSON_NO_IO #include // random_access_iterator_tag #include // unique_ptr #include // accumulate @@ -5236,9 +5238,7 @@ std::size_t hash(const BasicJsonType& j) #include // array #include // size_t -#include //FILE * #include // strlen -#include // istream #include // begin, end, iterator_traits, random_access_iterator_tag, distance, next #include // shared_ptr, make_shared, addressof #include // accumulate @@ -5246,6 +5246,11 @@ std::size_t hash(const BasicJsonType& j) #include // enable_if, is_base_of, is_pointer, is_integral, remove_pointer #include // pair, declval +#ifndef JSON_NO_IO + #include //FILE * + #include // istream +#endif // JSON_NO_IO + // #include // #include @@ -13132,12 +13137,16 @@ class json_ref #include // copy #include // size_t -#include // streamsize #include // back_inserter #include // shared_ptr, make_shared -#include // basic_ostream #include // basic_string #include // vector + +#ifndef JSON_NO_IO + #include // streamsize + #include // basic_ostream +#endif // JSON_NO_IO + // #include @@ -24059,7 +24068,7 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec parser(detail::input_adapter(i)).parse(false, j); return i; } -#endif // JSON_NO_IO +#endif // JSON_NO_IO /// @} ///////////////////////////