SHA256
8
0
forked from pool/cppunit
Files
cppunit/gcc9-Wdeprecated-copy-1.patch

42 lines
1.7 KiB
Diff
Raw Normal View History

From 4f5cd3b486afb9c7be1903252b4ae3787137a454 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Tue, 7 Aug 2018 16:24:49 +0200
Subject: [PATCH] Avoid GCC 9 -Wdeprecated-copy
...when an implicitly-defined copy function is used that may in a future C++
standard be defined as deleted because of the user-declared destructor. Just
declare all the four copy/move functions as defaulted for a consistent
interface.
(Originally addressed with LibreOffice commit
<https://gerrit.libreoffice.org/58042> "external/cppunit: silence
-Werror=deprecated-copy (GCC trunk towards GCC 9)".)
Change-Id: Ie38ac3a613e6fbc2e4045cb5b14c3f6d167c79c5
Reviewed-on: https://gerrit.libreoffice.org/58690
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
---
include/cppunit/extensions/TestSuiteBuilderContext.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/cppunit/extensions/TestSuiteBuilderContext.h b/include/cppunit/extensions/TestSuiteBuilderContext.h
index 72bfa70..12d157e 100644
--- a/include/cppunit/extensions/TestSuiteBuilderContext.h
+++ b/include/cppunit/extensions/TestSuiteBuilderContext.h
@@ -40,6 +40,11 @@ public:
virtual ~TestSuiteBuilderContextBase();
+ TestSuiteBuilderContextBase(TestSuiteBuilderContextBase const &) = default;
+ TestSuiteBuilderContextBase(TestSuiteBuilderContextBase &&) = default;
+ TestSuiteBuilderContextBase & operator =(TestSuiteBuilderContextBase const &) = default;
+ TestSuiteBuilderContextBase & operator =(TestSuiteBuilderContextBase &&) = default;
+
/*! \brief Adds a test to the fixture suite.
*
* \param test Test to add to the fixture suite. Must not be \c NULL.
--
2.21.0