summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/nlohmann-json
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools/nlohmann-json')
-rw-r--r--meta-oe/recipes-devtools/nlohmann-json/nlohmann-json/0001-Templatize-basic_json-ctor-from-json_ref.patch99
-rw-r--r--meta-oe/recipes-devtools/nlohmann-json/nlohmann-json/0001-typo-fix.patch43
-rw-r--r--meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.9.0.bb (renamed from meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.7.3.bb)6
3 files changed, 2 insertions, 146 deletions
diff --git a/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json/0001-Templatize-basic_json-ctor-from-json_ref.patch b/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json/0001-Templatize-basic_json-ctor-from-json_ref.patch
deleted file mode 100644
index aea48b60a..000000000
--- a/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json/0001-Templatize-basic_json-ctor-from-json_ref.patch
+++ /dev/null
@@ -1,99 +0,0 @@
1From ec955f08b47ab7cb81f6e4a4c3e7b331ddf50f71 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Art=C3=B6m=20Bakri=20Al-Sarmini?= <3sz3tt+git@gmail.com>
3Date: Sun, 12 Apr 2020 22:32:39 +0300
4Subject: [PATCH] Templatize basic_json ctor from json_ref
5
6Upstream-Status: Backport [https://github.com/nlohmann/json/commit/ec955f08b47ab7cb81f6e4a4c3e7b331ddf50f71]
7Signed-off-by: Andrew Geissler <geissonator@gmail.com>
8
9---
10 include/nlohmann/detail/meta/type_traits.hpp | 13 ++++++++++++
11 include/nlohmann/json.hpp | 8 ++++----
12 single_include/nlohmann/json.hpp | 21 ++++++++++++++++----
13 3 files changed, 34 insertions(+), 8 deletions(-)
14
15diff --git a/include/nlohmann/detail/meta/type_traits.hpp b/include/nlohmann/detail/meta/type_traits.hpp
16index 280f6953..dd0b3084 100644
17--- a/include/nlohmann/detail/meta/type_traits.hpp
18+++ b/include/nlohmann/detail/meta/type_traits.hpp
19@@ -41,6 +41,19 @@ template<typename> struct is_basic_json : std::false_type {};
20 NLOHMANN_BASIC_JSON_TPL_DECLARATION
21 struct is_basic_json<NLOHMANN_BASIC_JSON_TPL> : std::true_type {};
22
23+//////////////////////
24+// jspn_ref helpers //
25+//////////////////////
26+
27+template <typename>
28+class json_ref;
29+
30+template<typename>
31+struct is_json_ref : std::false_type {};
32+
33+template <typename T>
34+struct is_json_ref<json_ref<T>> : std::true_type {};
35+
36 //////////////////////////
37 // aliases for detected //
38 //////////////////////////
39diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp
40index 336d69fe..0598efc8 100644
41--- a/include/nlohmann/json.hpp
42+++ b/include/nlohmann/json.hpp
43@@ -1773,10 +1773,10 @@ class basic_json
44 // other constructors and destructor //
45 ///////////////////////////////////////
46
47- /// @private
48- basic_json(const detail::json_ref<basic_json>& ref)
49- : basic_json(ref.moved_or_copied())
50- {}
51+ template <typename JsonRef,
52+ detail::enable_if_t<detail::conjunction<detail::is_json_ref<JsonRef>,
53+ std::is_same<typename JsonRef::value_type, basic_json>>::value, int> = 0 >
54+ basic_json(const JsonRef& ref) : basic_json(ref.moved_or_copied()) {}
55
56 /*!
57 @brief copy constructor
58diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp
59index 09464f3b..8927180e 100644
60--- a/single_include/nlohmann/json.hpp
61+++ b/single_include/nlohmann/json.hpp
62@@ -2794,6 +2794,19 @@ template<typename> struct is_basic_json : std::false_type {};
63 NLOHMANN_BASIC_JSON_TPL_DECLARATION
64 struct is_basic_json<NLOHMANN_BASIC_JSON_TPL> : std::true_type {};
65
66+//////////////////////
67+// jspn_ref helpers //
68+//////////////////////
69+
70+template <typename>
71+class json_ref;
72+
73+template<typename>
74+struct is_json_ref : std::false_type {};
75+
76+template <typename T>
77+struct is_json_ref<json_ref<T>> : std::true_type {};
78+
79 //////////////////////////
80 // aliases for detected //
81 //////////////////////////
82@@ -16632,10 +16645,10 @@ class basic_json
83 // other constructors and destructor //
84 ///////////////////////////////////////
85
86- /// @private
87- basic_json(const detail::json_ref<basic_json>& ref)
88- : basic_json(ref.moved_or_copied())
89- {}
90+ template <typename JsonRef,
91+ detail::enable_if_t<detail::conjunction<detail::is_json_ref<JsonRef>,
92+ std::is_same<typename JsonRef::value_type, basic_json>>::value, int> = 0 >
93+ basic_json(const JsonRef& ref) : basic_json(ref.moved_or_copied()) {}
94
95 /*!
96 @brief copy constructor
97--
982.21.0 (Apple Git-122)
99
diff --git a/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json/0001-typo-fix.patch b/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json/0001-typo-fix.patch
deleted file mode 100644
index 6af4e9740..000000000
--- a/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json/0001-typo-fix.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1From 70be9751cd60e622ce6463f41d47c02fc2d83cbc Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Art=C3=B6m=20Bakri=20Al-Sarmini?= <3sz3tt+git@gmail.com>
3Date: Sun, 12 Apr 2020 23:42:26 +0300
4Subject: [PATCH] typo fix
5
6Upstream-Status: Backport [https://github.com/nlohmann/json/commit/70be9751cd60e622ce6463f41d47c02fc2d83cbc]
7
8Signed-off-by: Andrew Geissler <geissonator@gmail.com>
9
10---
11 include/nlohmann/detail/meta/type_traits.hpp | 2 +-
12 single_include/nlohmann/json.hpp | 2 +-
13 2 files changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/include/nlohmann/detail/meta/type_traits.hpp b/include/nlohmann/detail/meta/type_traits.hpp
16index dd0b3084..13e92cb4 100644
17--- a/include/nlohmann/detail/meta/type_traits.hpp
18+++ b/include/nlohmann/detail/meta/type_traits.hpp
19@@ -42,7 +42,7 @@ NLOHMANN_BASIC_JSON_TPL_DECLARATION
20 struct is_basic_json<NLOHMANN_BASIC_JSON_TPL> : std::true_type {};
21
22 //////////////////////
23-// jspn_ref helpers //
24+// json_ref helpers //
25 //////////////////////
26
27 template <typename>
28diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp
29index 8927180e..294e7509 100644
30--- a/single_include/nlohmann/json.hpp
31+++ b/single_include/nlohmann/json.hpp
32@@ -2795,7 +2795,7 @@ NLOHMANN_BASIC_JSON_TPL_DECLARATION
33 struct is_basic_json<NLOHMANN_BASIC_JSON_TPL> : std::true_type {};
34
35 //////////////////////
36-// jspn_ref helpers //
37+// json_ref helpers //
38 //////////////////////
39
40 template <typename>
41--
422.21.0 (Apple Git-122)
43
diff --git a/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.7.3.bb b/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.9.0.bb
index 5766194d2..0f5ef7052 100644
--- a/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.7.3.bb
+++ b/meta-oe/recipes-devtools/nlohmann-json/nlohmann-json_3.9.0.bb
@@ -2,14 +2,12 @@ SUMMARY = "JSON for modern C++"
2HOMEPAGE = "https://nlohmann.github.io/json/" 2HOMEPAGE = "https://nlohmann.github.io/json/"
3SECTION = "libs" 3SECTION = "libs"
4LICENSE = "MIT" 4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://LICENSE.MIT;md5=f5f7c71504da070bcf4f090205ce1080" 5LIC_FILES_CHKSUM = "file://LICENSE.MIT;md5=dd0607f896f392c8b7d0290a676efc24"
6 6
7SRC_URI = "git://github.com/nlohmann/json.git;nobranch=1 \ 7SRC_URI = "git://github.com/nlohmann/json.git;nobranch=1 \
8 file://0001-Templatize-basic_json-ctor-from-json_ref.patch \
9 file://0001-typo-fix.patch \
10 " 8 "
11 9
12SRCREV = "e7b3b40b5a95bc74b9a7f662830a27c49ffc01b4" 10SRCREV = "d34771cafc87b358ba421faca28facc7f8080174"
13 11
14S = "${WORKDIR}/git" 12S = "${WORKDIR}/git"
15 13