Skip to content

Commit

Permalink
Fix a -Wdeprecated warning.
Browse files Browse the repository at this point in the history
    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() {}
                ^
  • Loading branch information
Quuxplusone committed Apr 16, 2020
1 parent 40827d9 commit b543eb7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions googletest/test/googletest-port-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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_; }

Expand Down

0 comments on commit b543eb7

Please sign in to comment.