From d7a2956b24a7d592c49475027eb99c7e717e9b64 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 27 Jun 2020 13:16:20 +0200 Subject: [PATCH] :twisted_rightwards_arrows: merge from develop --- .../nlohmann/detail/input/input_adapters.hpp | 6 +- include/nlohmann/detail/input/lexer.hpp | 2 +- single_include/nlohmann/json.hpp | 1243 +++++++++-------- 3 files changed, 626 insertions(+), 625 deletions(-) diff --git a/include/nlohmann/detail/input/input_adapters.hpp b/include/nlohmann/detail/input/input_adapters.hpp index db437856..13a8bfe8 100644 --- a/include/nlohmann/detail/input/input_adapters.hpp +++ b/include/nlohmann/detail/input/input_adapters.hpp @@ -403,9 +403,9 @@ using contiguous_bytes_input_adapter = decltype(input_adapter(std::declval::value && - not std::is_array::value && - std::is_integral::type>::value && + std::is_pointer::value&& + not std::is_array::value&& + std::is_integral::type>::value&& sizeof(typename std::remove_pointer::type) == 1, int >::type = 0 > contiguous_bytes_input_adapter input_adapter(CharT b) diff --git a/include/nlohmann/detail/input/lexer.hpp b/include/nlohmann/detail/input/lexer.hpp index a3bee55a..e21c7295 100644 --- a/include/nlohmann/detail/input/lexer.hpp +++ b/include/nlohmann/detail/input/lexer.hpp @@ -1511,7 +1511,7 @@ scan_number_done: skip_whitespace(); // ignore comments - if (ignore_comments and current == '/') + if (ignore_comments && current == '/') { if (not scan_comment()) { diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 770418f4..a387655f 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -2592,11 +2592,11 @@ namespace nlohmann { namespace detail { -template struct make_void +template struct make_void { using type = void; }; -template using void_t = typename make_void::type; +template using void_t = typename make_void::type; } // namespace detail } // namespace nlohmann @@ -2607,10 +2607,10 @@ namespace nlohmann { namespace detail { -template +template struct iterator_types {}; -template +template struct iterator_types < It, void_t +template struct iterator_traits { }; -template +template struct iterator_traits < T, enable_if_t < !std::is_pointer::value >> : iterator_types { }; -template +template struct iterator_traits::value>> { using iterator_category = std::random_access_iterator_tag; @@ -2675,39 +2675,39 @@ struct nonesuch void operator=(nonesuch&&) = delete; }; -template class Op, - class... Args> +template class Op, + class... Args> struct detector { using value_t = std::false_type; using type = Default; }; -template class Op, class... Args> +template class Op, class... Args> struct detector>, Op, Args...> { using value_t = std::true_type; using type = Op; }; -template