[arch-commits] Commit in libreoffice-still/trunk (2 files)
Evangelos Foutras
foutrelis at archlinux.org
Fri Jul 3 11:24:07 UTC 2020
Date: Friday, July 3, 2020 @ 11:24:06
Author: foutrelis
Revision: 390786
Adapt o3tl::span to removal of std::span::cbegin et al
Added:
libreoffice-still/trunk/adapt-o3tl-span-to-newer-libstdc++.patch
Modified:
libreoffice-still/trunk/PKGBUILD
------------------------------------------+
PKGBUILD | 4 +
adapt-o3tl-span-to-newer-libstdc++.patch | 67 +++++++++++++++++++++++++++++
2 files changed, 71 insertions(+)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2020-07-03 11:09:35 UTC (rev 390785)
+++ PKGBUILD 2020-07-03 11:24:06 UTC (rev 390786)
@@ -58,6 +58,7 @@
libreoffice-still.sh libreoffice-still.csh
0001-Switch-mdds-to-1.5.0-and-liborcus-to-0.15.0.patch
libreoffice-poppler-0.86.patch
+ adapt-o3tl-span-to-newer-libstdc++.patch
disable-latest-c++.diff)
noextract=(35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
@@ -103,6 +104,7 @@
'07c28ff8f5258abfe4338efccbdfb1dd35892bd00a2ed7f53b1fc2263f71a8b6'
'77214ebc425916990ed80e9508572fd1d565412e1f8c2289424457e3d9bcbc79'
'f52ef5d64d7a74ca90bc96614260566720130d91f3764874eac673f6b3336b5e'
+ '5e2c7a0a5acf033359253617ec19c076fc1d58e1664e92cd09ec539f35487f1e'
'fde9801d839028c1e9ce0403b0ad7625620fe1ee3d54cb439f4651f3ab9b886f')
prepare() {
@@ -115,6 +117,8 @@
# https://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-6-4&id=f0b74640137f07ed74027f98fbf6d1c0d98939bf
# prerequisite: https://cgit.freedesktop.org/libreoffice/core/commit/?id=a9f77e87f3e6ca3333bbb16dec5456f3bf2903b8
patch -Np1 -i ../disable-latest-c++.diff
+ # https://cgit.freedesktop.org/libreoffice/core/commit/?id=6fbfad6b00e8c35346ee59cd32a0d7ccc0d8c19c
+ patch -Np1 -i ../adapt-o3tl-span-to-newer-libstdc++.patch
# move external sources into place
mkdir "${srcdir}"/ext_sources && pushd "${srcdir}"/ext_sources
Added: adapt-o3tl-span-to-newer-libstdc++.patch
===================================================================
--- adapt-o3tl-span-to-newer-libstdc++.patch (rev 0)
+++ adapt-o3tl-span-to-newer-libstdc++.patch 2020-07-03 11:24:06 UTC (rev 390786)
@@ -0,0 +1,67 @@
+From 81db91d8014cebca0c22e17ac46b175d4a92539b Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sbergman at redhat.com>
+Date: Sat, 22 Feb 2020 17:29:15 +0100
+Subject: [PATCH] Adapt o3tl::span to removal of std::span::cbegin et al
+
+<https://cplusplus.github.io/LWG/issue3320> "span::cbegin/cend methods produce
+different results than std::[ranges::]cbegin/cend", as implemented now in
+<https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;a=commit;
+h=247f410b83797a1840573840cc2a539ef9d7f96b> "libstdc++: Remove std::span::cbegin
+and std::span::cend (LWG 3320)".
+
+Turns out we only used the removed member functions in o3tl/qa/test-span.cxx.
+
+Change-Id: I6c73797594b4e0e753a88840033d54961e271df5
+Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89261
+Tested-by: Jenkins
+Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
+
+(cherry picked from commit 6fbfad6b00e8c35346ee59cd32a0d7ccc0d8c19c)
+---
+ include/o3tl/span.hxx | 7 -------
+ o3tl/qa/test-span.cxx | 6 ------
+ 2 files changed, 13 deletions(-)
+
+diff --git a/include/o3tl/span.hxx b/include/o3tl/span.hxx
+index 1618b86df897..1c24f165e726 100644
+--- a/include/o3tl/span.hxx
++++ b/include/o3tl/span.hxx
+@@ -60,18 +60,11 @@ public:
+ constexpr iterator begin() const noexcept { return data_; }
+ constexpr iterator end() const noexcept { return begin() + size(); }
+
+- constexpr const_iterator cbegin() const noexcept { return begin(); }
+- constexpr const_iterator cend() const noexcept { return end(); }
+-
+ reverse_iterator rbegin() const noexcept
+ { return reverse_iterator(end()); }
+ reverse_iterator rend() const noexcept
+ { return reverse_iterator(begin()); }
+
+- constexpr const_reverse_iterator crbegin() const noexcept
+- { return rbegin(); }
+- constexpr const_reverse_iterator crend() const noexcept { return rend(); }
+-
+ constexpr index_type size() const noexcept { return size_; }
+
+ constexpr reference operator [](index_type pos) const {
+diff --git a/o3tl/qa/test-span.cxx b/o3tl/qa/test-span.cxx
+index 7ec67fa7fd91..eabe1a55cd6f 100644
+--- a/o3tl/qa/test-span.cxx
++++ b/o3tl/qa/test-span.cxx
+@@ -33,15 +33,9 @@ private:
+ CPPUNIT_ASSERT_EQUAL(1, *v.begin());
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::span<int>::difference_type(3), v.end() - v.begin());
+- CPPUNIT_ASSERT_EQUAL(1, *v.cbegin());
+- CPPUNIT_ASSERT_EQUAL(
+- o3tl::span<int>::difference_type(3), v.cend() - v.cbegin());
+ CPPUNIT_ASSERT_EQUAL(3, *v.rbegin());
+ CPPUNIT_ASSERT_EQUAL(
+ o3tl::span<int>::difference_type(3), v.rend() - v.rbegin());
+- CPPUNIT_ASSERT_EQUAL(3, *v.crbegin());
+- CPPUNIT_ASSERT_EQUAL(
+- o3tl::span<int>::difference_type(3), v.crend() - v.crbegin());
+ CPPUNIT_ASSERT_EQUAL(o3tl::span<int>::index_type(3), v.size());
+ CPPUNIT_ASSERT(!v.empty());
+ CPPUNIT_ASSERT_EQUAL(2, v[1]);
More information about the arch-commits
mailing list