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

Warning about implicit copy assignment operator in handle_type #26

Open
burnpanck opened this issue Dec 13, 2019 · 0 comments
Open

Warning about implicit copy assignment operator in handle_type #26

burnpanck opened this issue Dec 13, 2019 · 0 comments

Comments

@burnpanck
Copy link

Starting with GCC 9 (though not with GCC 8, nor Clang 9), I get a warning when I assign a mutation handle (-Wdeprecated-copy). The reason seems to be that, because struct handle_type declares a copy constructor (boost/heap/detail/mutable_heap.hpp:94) but not an assignment operator, GCC warns that the implicitly declared one might not be intentionally there.

I assume that in this case, the warning is unnecessary, as the explicit copy constructor really is in fact not any different from an implicit one. Probably, it just needs an accompanying copy assignment operator, possibly as handle_type operator=(handle_type const &) = default; if that is supported by all target compilers.

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

1 participant