opencv / ade

Apache License 2.0
59 stars 49 forks source link

Fixed clang -Wdeprecated-copy warnings in OpenCV #33

Closed mshabunin closed 1 year ago

mshabunin commented 1 year ago

If the class definition does not explicitly declare a copy constructor, a non-explicit one is declared implicitly. If the class definition declares a move constructor or move assignment operator, the implicitly declared copy constructor is defined as deleted; otherwise, it is defaulted ([dcl.fct.def]). The latter case is deprecated if the class has a user-declared copy assignment operator or a user-declared destructor ([depr.impldec]).

See http://eel.is/c++draft/class.copy.ctor#6 and https://bugs.llvm.org/show_bug.cgi?id=45634

I decided to implement copy constructor instead of removing explicit operator= , hope it is correct.

resolves #32

mshabunin commented 1 year ago

@dmatveev , thank you! Are you going to make a new release soon?

dmatveev commented 11 months ago

@mshabunin there was no enough content in master since then, if it is critical to include into the latest OpenCV then we can push a new tag for sure.

mshabunin commented 11 months ago

Well, these warnings are quite annoying. Taking in account that previous minor release have been created to address similar problem, I think it's not a big issue. So I'm making a new minor-minor :slightly_smiling_face: release 0.1.2b.

dmatveev commented 11 months ago

@mshabunin thanks a lot for taking care of this!!