From: "Arsen Arsenović" <arsen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-cpp/nlohmann_json/, dev-cpp/nlohmann_json/files/
Date: Tue, 21 Feb 2023 12:27:04 +0000 (UTC) [thread overview]
Message-ID: <1676982395.0b9bc827044513629412186679b81112b5f633fd.arsen@gentoo> (raw)
commit: 0b9bc827044513629412186679b81112b5f633fd
Author: Arsen Arsenović <arsen <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 21 12:23:17 2023 +0000
Commit: Arsen Arsenović <arsen <AT> gentoo <DOT> org>
CommitDate: Tue Feb 21 12:26:35 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b9bc827
dev-cpp/nlohmann_json: Fix test build failure error on GCC 13
Closes: https://bugs.gentoo.org/895692
Signed-off-by: Arsen Arsenović <arsen <AT> gentoo.org>
.../files/nlohmann_json-3.11.2-gcc13-2.patch | 42 ++++++++++++++++++++++
.../nlohmann_json/nlohmann_json-3.11.2-r1.ebuild | 1 +
2 files changed, 43 insertions(+)
diff --git a/dev-cpp/nlohmann_json/files/nlohmann_json-3.11.2-gcc13-2.patch b/dev-cpp/nlohmann_json/files/nlohmann_json-3.11.2-gcc13-2.patch
new file mode 100644
index 000000000000..a2931880dbcd
--- /dev/null
+++ b/dev-cpp/nlohmann_json/files/nlohmann_json-3.11.2-gcc13-2.patch
@@ -0,0 +1,42 @@
+From a49829bd984c0282be18fcec070df0c31bf77dd5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@gentoo.org>
+Date: Tue, 21 Feb 2023 12:59:21 +0100
+Subject: [PATCH] tests/unit-iterators2: use std::ranges::equals for range
+ comparisons
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This fixes a build error on GCC 13:
+
+ /home/arsen/nlohmann_json/tests/src/unit-iterators2.cpp: In function ‘void _DOCTEST_ANON_FUNC_2()’:
+ /home/arsen/nlohmann_json/tests/src/unit-iterators2.cpp:946:32: error: no match for ‘operator==’ (operand types are ‘doctest::detail::Expression_lhs<std::ranges::reverse_view<std::ranges::ref_view<nlohmann::json_abi_v3_11_2::basic_json<> > >&>’ and ‘nlohmann::json_abi_v3_11_2::json’ {aka ‘nlohmann::json_abi_v3_11_2::basic_json<>’})
+ 946 | CHECK(reversed == j_expected);
+ | ^~ ~~~~~~~~~~
+ | |
+ | nlohmann::json_abi_v3_11_2::json {aka nlohmann::json_abi_v3_11_2::basic_json<>}
+
+Bug: https://bugs.gentoo.org/895692
+Closes: #3927
+---
+Forwarded: https://github.com/nlohmann/json/pull/3950
+
+ tests/src/unit-iterators2.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/src/unit-iterators2.cpp b/tests/src/unit-iterators2.cpp
+index 27926084..72a5d9dc 100644
+--- a/tests/src/unit-iterators2.cpp
++++ b/tests/src/unit-iterators2.cpp
+@@ -943,7 +943,7 @@ TEST_CASE("iterators 2")
+ json j_expected{5, 4, 3, 2, 1};
+
+ auto reversed = j | std::views::reverse;
+- CHECK(reversed == j_expected);
++ CHECK(std::ranges::equal(reversed, j_expected));
+ }
+
+ SECTION("transform")
+--
+2.39.2
+
diff --git a/dev-cpp/nlohmann_json/nlohmann_json-3.11.2-r1.ebuild b/dev-cpp/nlohmann_json/nlohmann_json-3.11.2-r1.ebuild
index 180f62d3f096..fbe212f01306 100644
--- a/dev-cpp/nlohmann_json/nlohmann_json-3.11.2-r1.ebuild
+++ b/dev-cpp/nlohmann_json/nlohmann_json-3.11.2-r1.ebuild
@@ -29,6 +29,7 @@ DOCS=( ChangeLog.md README.md )
PATCHES=(
"${FILESDIR}"/${PN}-3.11.2-gcc13.patch
+ "${FILESDIR}"/${PN}-3.11.2-gcc13-2.patch
)
src_prepare() {
next reply other threads:[~2023-02-21 12:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 12:27 Arsen Arsenović [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-04-19 20:54 [gentoo-commits] repo/gentoo:master commit in: dev-cpp/nlohmann_json/, dev-cpp/nlohmann_json/files/ Sam James
2020-05-15 0:34 Aaron Bauman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1676982395.0b9bc827044513629412186679b81112b5f633fd.arsen@gentoo \
--to=arsen@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox