[Libreoffice-commits] core.git: include/cppcanvas

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Jul 28 08:36:01 UTC 2018


 include/cppcanvas/canvas.hxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit e1d7b0973d8318bd7f153350e2e8a38bec3b3e7b
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Jul 27 13:22:30 2018 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Sat Jul 28 10:35:40 2018 +0200

    Silence bogus GCC 8 -Werror=virtual-move-assign
    
    ...seen with at least gcc-c++-8.1.1-1.fc28.x86_64 and
    gcc-c++-8.1.1-5.fc28.x86_64 after 5065bcf513147c1b92edc9d393768b01bc693c3a
    "cppcanvas: avoid -Werror=deprecated-copy (GCC trunk towards GCC 9)" and
    6844ef8a7ed9b253b6cca4c8d8aec54ef05d013e "cppcanvas: avoid -Werror=deprecated-
    copy (GCC trunk towards GCC 9)":
    
    > [CXX] cppcanvas/source/wrapper/implbitmapcanvas.cxx
    > In file included from cppcanvas/source/wrapper/implbitmapcanvas.hxx:26,
    >                  from cppcanvas/source/wrapper/implbitmapcanvas.cxx:28:
    > include/cppcanvas/bitmapcanvas.hxx:41:11: error: defaulted move assignment for ‘cppcanvas::BitmapCanvas’ calls a non-trivial move assignment operator for virtual base ‘cppcanvas::Canvas’ [-Werror=virtual-move-assign]
    >      class BitmapCanvas : public virtual Canvas
    >            ^~~~~~~~~~~~
    
    Change-Id: I5348eb110c147957347554504a7e7c6d7fb32b70
    Reviewed-on: https://gerrit.libreoffice.org/58185
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/include/cppcanvas/canvas.hxx b/include/cppcanvas/canvas.hxx
index 532da2f0b342..c8ae6e8ca7e5 100644
--- a/include/cppcanvas/canvas.hxx
+++ b/include/cppcanvas/canvas.hxx
@@ -73,7 +73,9 @@ namespace cppcanvas
         Canvas(Canvas const &) = default;
         Canvas(Canvas &&) = default;
         Canvas & operator =(Canvas const &) = default;
+#if !(defined __GNUC__ && !defined __clang__ && __GNUC__ == 8) // bogus -Werror=virtual-move-assign
         Canvas & operator =(Canvas &&) = default;
+#endif
 
         virtual ~Canvas() {}
 


More information about the Libreoffice-commits mailing list