From fb59553abf02d63cd3a24c52d987204e0af66e70 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Mon, 20 Jul 2020 15:57:19 +0200 Subject: [PATCH] external/gpgmepp: Deprecated std::shared_pointer::unique has been removed... ...from C++20, and is no longer provided at least by VS 2019 16.6.4 when using --with-latest-c++ Change-Id: I1812b4c314febe134a299e42362ca50b495f08d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99081 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- external/gpgmepp/UnpackedTarball_gpgmepp.mk | 1 + external/gpgmepp/c++20.patch | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 external/gpgmepp/c++20.patch diff --git a/external/gpgmepp/UnpackedTarball_gpgmepp.mk b/external/gpgmepp/UnpackedTarball_gpgmepp.mk index 73251661c9a3..933d228ac1d3 100644 --- a/external/gpgmepp/UnpackedTarball_gpgmepp.mk +++ b/external/gpgmepp/UnpackedTarball_gpgmepp.mk @@ -28,5 +28,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,gpgmepp, \ $(if $(filter LINUX,$(OS)),external/gpgmepp/rpath.patch) \ external/gpgmepp/gcc9.patch \ external/gpgmepp/ubsan.patch \ + external/gpgmepp/c++20.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/external/gpgmepp/c++20.patch b/external/gpgmepp/c++20.patch new file mode 100644 index 000000000000..3141dca1ea70 --- /dev/null +++ b/external/gpgmepp/c++20.patch @@ -0,0 +1,11 @@ +--- lang/cpp/src/keylistresult.cpp ++++ lang/cpp/src/keylistresult.cpp +@@ -77,7 +77,7 @@ + + void GpgME::KeyListResult::detach() + { +- if (!d || d.unique()) { ++ if (!d || d.use_count() == 1) { + return; + } + d.reset(new Private(*d));