diff -Nru cppgir-2.0/debian/changelog cppgir-2.0/debian/changelog --- cppgir-2.0/debian/changelog 2024-01-07 18:40:40.000000000 +0000 +++ cppgir-2.0/debian/changelog 2024-01-08 08:48:52.000000000 +0000 @@ -1,3 +1,9 @@ +cppgir (2.0-2) unstable; urgency=medium + + * Add gi-restrict-string-template-conversion-operator.patch from upstream Git. + + -- Nicholas Guriev Mon, 08 Jan 2024 11:48:52 +0300 + cppgir (2.0-1) unstable; urgency=medium * New upstream release. diff -Nru cppgir-2.0/debian/patches/gi-restrict-string-template-conversion-operator.patch cppgir-2.0/debian/patches/gi-restrict-string-template-conversion-operator.patch --- cppgir-2.0/debian/patches/gi-restrict-string-template-conversion-operator.patch 1970-01-01 00:00:00.000000000 +0000 +++ cppgir-2.0/debian/patches/gi-restrict-string-template-conversion-operator.patch 2024-01-07 21:02:19.000000000 +0000 @@ -0,0 +1,35 @@ +From ce6d4c9a3bb8a7b7c00447d56c16e0975705f2a2 Mon Sep 17 00:00:00 2001 +From: Mark Nauwelaerts +Date: Sun, 17 Dec 2023 23:44:13 +0100 +Subject: [PATCH] gi: restrict string template conversion operator + +See issue #65 +--- + gi/string.hpp | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/gi/string.hpp b/gi/string.hpp +index 3621b50..55b7926 100644 +--- a/gi/string.hpp ++++ b/gi/string.hpp +@@ -749,10 +749,17 @@ struct converter, + + // to a typical string(_view) case + // (avoid conflict with above) ++// the traits_type (tries to) restricts this to std::string(_view) ++// not doing so might conveniently allow conversion to other types as well. ++// however, this would also allow e.g. QByteArray, which comes with an operator+ ++// in global namespace (also selected by non-ADL lookup), ++// which then results in ambiguous overload ++// (with the operator+ that is provided above) + template + struct converter, To, + typename std::enable_if< + !std::is_base_of::value && ++ !std::is_same::value && + std::is_constructible::value>::type> + : public converter_base, To> + { +-- +GitLab + diff -Nru cppgir-2.0/debian/patches/series cppgir-2.0/debian/patches/series --- cppgir-2.0/debian/patches/series 2024-01-07 18:32:27.000000000 +0000 +++ cppgir-2.0/debian/patches/series 2024-01-07 21:02:19.000000000 +0000 @@ -1,2 +1,3 @@ Build-examples.patch +gi-restrict-string-template-conversion-operator.patch gi-avoid-incomplete-type-in-std::is_convertible.patch