Fix a -Wdeprecated warning.

googletest-param-test-test.cc:502:8: error:
    definition of implicit copy constructor for
    'NonDefaultConstructAssignString' is deprecated because it has a
    user-declared copy assignment operator [-Werror,-Wdeprecated]
        void operator=(const NonDefaultConstructAssignString&);
             ^
This commit is contained in:
Arthur O'Dwyer 2020-04-16 16:15:10 -04:00
parent 01c0ff5e23
commit c7d8ec72cc

View File

@ -490,16 +490,15 @@ TEST(CombineTest, CombineWithMaxNumberOfParameters) {
class NonDefaultConstructAssignString {
public:
NonDefaultConstructAssignString(const std::string& s) : str_(s) {}
NonDefaultConstructAssignString() = delete;
NonDefaultConstructAssignString(const NonDefaultConstructAssignString&) = default;
NonDefaultConstructAssignString& operator=(const NonDefaultConstructAssignString&) = delete;
~NonDefaultConstructAssignString() = default;
const std::string& str() const { return str_; }
private:
std::string str_;
// Not default constructible
NonDefaultConstructAssignString();
// Not assignable
void operator=(const NonDefaultConstructAssignString&);
};
TEST(CombineTest, NonDefaultConstructAssign) {