summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-12-09 13:17:05 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-12-09 14:26:16 +0000
commite2d3baf0db4dec6b7b00192c41700611bd1d147c (patch)
treefd787afbc76dbac399fe87fc02625663d10aad45
parente1de95f72b1e6467510f7c3b32b25d7528c93a75 (diff)
external/zxing: Silence MSVC 2022 error C3781
> workdir\UnpackedTarball\zxing\core\src\Generator.h(20): error C3781: Generator<ZXing::DetectorResult>::promise_type: a coroutine's promise must declare either 'return_value' or 'return_void' seen at least when building with --with-latest-c++ against VS 2022 17.5.0 Preview 1.0 Change-Id: Ie69100d87e6cb85526d772e8f0f5d11e1f9d6704 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143853 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--external/zxing/UnpackedTarball_zxing.mk1
-rw-r--r--external/zxing/coroutine.patch.011
2 files changed, 12 insertions, 0 deletions
diff --git a/external/zxing/UnpackedTarball_zxing.mk b/external/zxing/UnpackedTarball_zxing.mk
index ac0aff061d72..9e877201a9e2 100644
--- a/external/zxing/UnpackedTarball_zxing.mk
+++ b/external/zxing/UnpackedTarball_zxing.mk
@@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,zxing, \
external/zxing/android_include.patch.0 \
external/zxing/missing-include.patch.0 \
external/zxing/msvc-lambdacapture.patch.0 \
+ external/zxing/coroutine.patch.0 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/zxing/coroutine.patch.0 b/external/zxing/coroutine.patch.0
new file mode 100644
index 000000000000..c863ff948f88
--- /dev/null
+++ b/external/zxing/coroutine.patch.0
@@ -0,0 +1,11 @@
+--- core/src/Generator.h
++++ core/src/Generator.h
+@@ -26,7 +26,7 @@
+ current_value = std::move(value);
+ return {};
+ }
+-// void return_value(T&& value) noexcept { current_value = std::move(value); }
++ void return_void() noexcept {}
+ // Disallow co_await in generator coroutines.
+ void await_transform() = delete;
+ [[noreturn]] static void unhandled_exception() { throw; }