From 01c0ff5e23735ed6b2e71904cde69f57efeae499 Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Thu, 16 Apr 2020 16:07:43 -0400 Subject: [PATCH] Fix a -Wdeprecated warning. googletest-port-test.cc:97:11: error: definition of implicit copy constructor for 'Base' is deprecated because it has a user-declared destructor [-Werror,-Wdeprecated] virtual ~Base() {} ^ --- googletest/test/googletest-port-test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/googletest/test/googletest-port-test.cc b/googletest/test/googletest-port-test.cc index 2af75c20..44b99ce5 100644 --- a/googletest/test/googletest-port-test.cc +++ b/googletest/test/googletest-port-test.cc @@ -90,10 +90,10 @@ TEST(IsXDigitTest, ReturnsFalseForWideNonAscii) { class Base { public: - // Copy constructor and assignment operator do exactly what we need, so we - // use them. Base() : member_(0) {} explicit Base(int n) : member_(n) {} + Base(const Base&) = default; + Base& operator=(const Base&) = default; virtual ~Base() {} int member() { return member_; }