Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated implicit copy assignment/constructor #2224

Open
omartijn opened this issue Apr 8, 2019 · 5 comments
Open

Deprecated implicit copy assignment/constructor #2224

omartijn opened this issue Apr 8, 2019 · 5 comments

Comments

@omartijn
Copy link

omartijn commented Apr 8, 2019

I am having trouble getting googletest to compile. The problem is that many classes rely on a default move constructor while defining a copy or move assignment operator. This has been deprecated and the compiler rightly complains about this.

Since googletest also defines warnings as errors it means it just doesn't work.

@omartijn
Copy link
Author

omartijn commented Apr 8, 2019

Example:

<path>/googletest/googlemock/src/gmock-spec-builders.cc:849:14: warning: definition of implicit copy assignment
      operator for 'Expectation' is deprecated because it has a user-declared destructor [-Wdeprecated]
Expectation::~Expectation() {}
             ^
<path>/googletest/googlemock/src/gmock-spec-builders.cc:858:24: note: in implicit copy assignment operator for
      'testing::Expectation' first required here
    *last_expectation_ = expectation;

@omartijn
Copy link
Author

Anybody working on this? I'd make a PR to fix it, but I've tried it in the past and could not get past the cla-bot. I'd rather not repeat that experience.

@davidbolvansky
Copy link

Ping.

LLVM hit this issue with gtest too.

@sffc
Copy link

sffc commented Jan 17, 2020

This is also affecting clients of google myanmar-tools: google/myanmar-tools#42

@namazso
Copy link

namazso commented Jul 18, 2022

This was fixed in #2815

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants