Hello community, here is the log from the commit of package nlohmann_json for openSUSE:Factory checked in at 2020-04-15 19:53:13 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/nlohmann_json (Old) and /work/SRC/openSUSE:Factory/.nlohmann_json.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "nlohmann_json" Wed Apr 15 19:53:13 2020 rev:9 rq:793779 version:3.7.3 Changes: -------- --- /work/SRC/openSUSE:Factory/nlohmann_json/nlohmann_json.changes 2019-08-05 10:37:54.883323490 +0200 +++ /work/SRC/openSUSE:Factory/.nlohmann_json.new.2738/nlohmann_json.changes 2020-04-15 19:53:17.553566465 +0200 @@ -1,0 +2,24 @@ +Tue Apr 14 06:04:52 UTC 2020 - Martin Liška <[email protected]> + +- Add gcc10-fix.patch in order to fix build with GCC 10. + +------------------------------------------------------------------- +Tue Apr 14 06:02:57 UTC 2020 - Martin Liška <[email protected]> + +- Update to version 3.7.3: + Bug Fixes + * Removed reserve() calls from the destructor which + could lead to quadratic complexity. + #1837 #1838 fire Deprecated functions + This release does not deprecate any functions. As an overview, + the following functions have been deprecated in earlier versions + and will be removed in the next major version (i.e., 4.0.0): + + * Function iterator_wrapper are deprecated. + Please use the member function items() instead. + Functions friend std::istream& operator<<(basic_json&, std::istream&) + and friend std::ostream& operator>>(const basic_json&, std::ostream&) + are deprecated. Please use friend std::istream& operator>>(std::istream&, basic_json&) + and friend operator<<(std::ostream&, const basic_json&) instead. + +------------------------------------------------------------------- Old: ---- json-3.7.0.tar.gz New: ---- gcc10-fix.patch json-3.7.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ nlohmann_json.spec ++++++ --- /var/tmp/diff_new_pack.1X8NQl/_old 2020-04-15 19:53:19.929567537 +0200 +++ /var/tmp/diff_new_pack.1X8NQl/_new 2020-04-15 19:53:19.929567537 +0200 @@ -1,7 +1,7 @@ # # spec file for package nlohmann_json # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # Copyright (c) 2018, Martin Hauke <[email protected]> # # All modifications and additions to the file contributed by third parties @@ -18,7 +18,7 @@ Name: nlohmann_json -Version: 3.7.0 +Version: 3.7.3 Release: 0 Summary: C++ header-only JSON library License: MIT @@ -26,6 +26,7 @@ URL: https://nlohmann.github.io/json/ #Git-Clone: https://github.com/nlohmann/json.git Source: https://github.com/nlohmann/json/archive/v%{version}.tar.gz#/json-%{version}.tar.gz +Patch0: gcc10-fix.patch BuildRequires: cmake >= 3.1 BuildRequires: memory-constraints %if 0%{?suse_version} < 1500 @@ -47,6 +48,7 @@ %prep %setup -q -n json-%{version} +%autopatch -p1 %build %if 0%{?suse_version} < 1500 ++++++ gcc10-fix.patch ++++++ >From ec955f08b47ab7cb81f6e4a4c3e7b331ddf50f71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Art=C3=B6m=20Bakri=20Al-Sarmini?= <[email protected]> Date: Sun, 12 Apr 2020 22:32:39 +0300 Subject: [PATCH] Templatize basic_json ctor from json_ref --- include/nlohmann/detail/meta/type_traits.hpp | 13 ++++++++++++ include/nlohmann/json.hpp | 8 ++++---- single_include/nlohmann/json.hpp | 21 ++++++++++++++++---- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/include/nlohmann/detail/meta/type_traits.hpp b/include/nlohmann/detail/meta/type_traits.hpp index 280f69534..dd0b3084f 100644 --- a/include/nlohmann/detail/meta/type_traits.hpp +++ b/include/nlohmann/detail/meta/type_traits.hpp @@ -41,6 +41,19 @@ template<typename> struct is_basic_json : std::false_type {}; NLOHMANN_BASIC_JSON_TPL_DECLARATION struct is_basic_json<NLOHMANN_BASIC_JSON_TPL> : std::true_type {}; +////////////////////// +// jspn_ref helpers // +////////////////////// + +template <typename> +class json_ref; + +template<typename> +struct is_json_ref : std::false_type {}; + +template <typename T> +struct is_json_ref<json_ref<T>> : std::true_type {}; + ////////////////////////// // aliases for detected // ////////////////////////// diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index 336d69fe7..0598efc8c 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -1773,10 +1773,10 @@ class basic_json // other constructors and destructor // /////////////////////////////////////// - /// @private - basic_json(const detail::json_ref<basic_json>& ref) - : basic_json(ref.moved_or_copied()) - {} + template <typename JsonRef, + detail::enable_if_t<detail::conjunction<detail::is_json_ref<JsonRef>, + std::is_same<typename JsonRef::value_type, basic_json>>::value, int> = 0 > + basic_json(const JsonRef& ref) : basic_json(ref.moved_or_copied()) {} /*! @brief copy constructor diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 09464f3b2..8927180e6 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -2794,6 +2794,19 @@ template<typename> struct is_basic_json : std::false_type {}; NLOHMANN_BASIC_JSON_TPL_DECLARATION struct is_basic_json<NLOHMANN_BASIC_JSON_TPL> : std::true_type {}; +////////////////////// +// jspn_ref helpers // +////////////////////// + +template <typename> +class json_ref; + +template<typename> +struct is_json_ref : std::false_type {}; + +template <typename T> +struct is_json_ref<json_ref<T>> : std::true_type {}; + ////////////////////////// // aliases for detected // ////////////////////////// @@ -16632,10 +16645,10 @@ class basic_json // other constructors and destructor // /////////////////////////////////////// - /// @private - basic_json(const detail::json_ref<basic_json>& ref) - : basic_json(ref.moved_or_copied()) - {} + template <typename JsonRef, + detail::enable_if_t<detail::conjunction<detail::is_json_ref<JsonRef>, + std::is_same<typename JsonRef::value_type, basic_json>>::value, int> = 0 > + basic_json(const JsonRef& ref) : basic_json(ref.moved_or_copied()) {} /*! @brief copy constructor ++++++ json-3.7.0.tar.gz -> json-3.7.3.tar.gz ++++++ /work/SRC/openSUSE:Factory/nlohmann_json/json-3.7.0.tar.gz /work/SRC/openSUSE:Factory/.nlohmann_json.new.2738/json-3.7.3.tar.gz differ: char 27, line 1
