external/zxing/UnpackedTarball_zxing.mk |    1 +
 external/zxing/coroutine.patch.0        |   11 +++++++++++
 2 files changed, 12 insertions(+)

New commits:
commit e2d3baf0db4dec6b7b00192c41700611bd1d147c
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Fri Dec 9 13:17:05 2022 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Fri Dec 9 14:26:16 2022 +0000

    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 <sberg...@redhat.com>

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; }

Reply via email to