vigra
vigra copied to clipboard
deprecated implicit member functions
I'm getting a large number of Wdeprecated-copy warnings with g++-11/linux, wrt different classes where either the copy ctor is used while the copy-assignment operator is implemented or the other way round. According to the rule of five declaring either of them prevents the implicit generation of the others.
Is this (including the omission of move ctors and move assignment operators) intentional, in order to support pre-C++-11 standard versions? Otherwise I'd make a pull request.
The code certainly dates back to pre-C++-11 days, and VIGRA's inventor and maintainer is no longer working on this, openly speaking, so we do not have anyone right now who is clearly responsible for such a decision.
What would be your suggestion?
I think the main three things to consider are that:
- my suggested change would be breaking for anyone who wants to include vigra headers into their project and use <= C++03
- g++-11 gives warnings in the current form. I think they may be errors in the future or for other compilers (g++ is usually quite forgiving).
- Adding the currently missing move ctors / move assignment operators may have some small performance benefits.
So the main question is whether there are any/many users who rely on pre-C++-11 code that need to be considered. I have no idea about that. Disregarding that constraint, there are clear benefits in updating to C++-11.
i'm definitely fine modernizing the codebase.
I would like to do it some order that resembles: https://github.com/ukoethe/vigra/issues/515
the problem described above is fixed by my pull request #507. That should be good to go as it is.
ok thank you. i'm getting the CIs back up and running. I might be interested to create a "release" before more intruisive changes.