STYLE: Rename ITK_DISALLOW_COPY_AND_ASSIGN to ITK_DISALLOW_COPY_AND_MOVE#2053
Conversation
|
This will cause another round of changes in remote modules, dependent libraries and application to update this macro. I am not sure whether this clarification is worth it. |
hjmjohnson
left a comment
There was a problem hiding this comment.
I think all 3 functions should be listed in the newly named macro ITK_DISALLOW_COPY_MOVE_ASSIGN
I like the clarity. For the moment we could make the old name an alias (not legacy), but have a note to make it legacy at the next major update. This will give a long transition period for the new name.
|
@hjmjohnson That makes sense. For now, put under future legacy macro. |
|
Thanks for your feedback, Hans and Dženan.
3 functions? But the macro actually deletes four of them:
You could mention all four in a macro name, but that would then be a very long macro name. Would you like that? Conceptually the macro disallows both copy and move, so I would still prefer to name it
You mean Would be fine to me. |
|
@N-Dekker I agree with you regarding COPY_MOVE only in the name. Thanks for pointing this out. Also good with future deprecation rather than current deprecation. |
f31ab05 to
c9e8d4d
Compare
|
The problem I feel about the old macro name "ITK_DISALLOW_COPY_AND_ASSIGN" isn't only about the fact that it does not mention "move". To me, the expression "disallow copy and assign" sounds like "disallow dogs and pets". Even though not all pets are dogs, and not all dogs are pets, it sounds a bit funny to me. Hope that makes some sense to you 😺 |
Clarifies that the macro does not just disallow copy and assign, but also move operations. Note that in this context, the term "move" refers to both move-construct and move-assign. With this commit, the old macro name will remain available, as long as `ITK_FUTURE_LEGACY_REMOVE = OFF` (which is the default).
The macro `ITK_DISALLOW_COPY_AND_ASSIGN` was just declared `ITK_FUTURE_LEGACY_REMOVE` with the previous commit, so now call the new `ITK_DISALLOW_COPY_AND_MOVE` macro instead!
c9e8d4d to
51171fa
Compare
hjmjohnson
left a comment
There was a problem hiding this comment.
@N-Dekker THANKS! This is really great. Thank you for being persistent.
blowekamp
left a comment
There was a problem hiding this comment.
Using future legacy seems remove appropriate here.
|
Looks like some were left behind? Or maybe these builds have some |
|
@jhlegarreta See #2059 |
The macro `ITK_DISALLOW_COPY_AND_ASSIGN` was declared `ITK_FUTURE_LEGACY_REMOVE` with ITK pull request InsightSoftwareConsortium/ITK#2053 commit InsightSoftwareConsortium/ITK@7d177ca "STYLE: Rename ITK_DISALLOW_COPY_AND_ASSIGN to ITK_DISALLOW_COPY_AND_MOVE" (included with ITK v5.2rc01) This commit follows ITK commit InsightSoftwareConsortium/ITK@4c0982d
The macro `ITK_DISALLOW_COPY_AND_ASSIGN` was declared `ITK_FUTURE_LEGACY_REMOVE` with ITK pull request InsightSoftwareConsortium/ITK#2053 commit InsightSoftwareConsortium/ITK@7d177ca "STYLE: Rename ITK_DISALLOW_COPY_AND_ASSIGN to ITK_DISALLOW_COPY_AND_MOVE" (included with ITK v5.2rc01) This commit follows ITK commit InsightSoftwareConsortium/ITK@4c0982d
Following ITK pull request InsightSoftwareConsortium/ITK#2053 commit InsightSoftwareConsortium/ITK@4c0982d (October 2020).
Following ITK pull request InsightSoftwareConsortium/ITK#2053 commit InsightSoftwareConsortium/ITK@4c0982d (October 2020).
Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in #2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
…OVE Fi... Original subject: STYLE: Rename ITK_DISALLOW_COPY_AND_ASSIGN to ITK_DISALLOW_COPY_AND_MOVE Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
…OVE Fi... Original subject: STYLE: Rename ITK_DISALLOW_COPY_AND_ASSIGN to ITK_DISALLOW_COPY_AND_MOVE Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
…OVE Fi... Original subject: STYLE: Rename ITK_DISALLOW_COPY_AND_ASSIGN to ITK_DISALLOW_COPY_AND_MOVE Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
…OVE Fi... Original subject: STYLE: Rename ITK_DISALLOW_COPY_AND_ASSIGN to ITK_DISALLOW_COPY_AND_MOVE Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
…OVE Fi... Original subject: STYLE: Rename ITK_DISALLOW_COPY_AND_ASSIGN to ITK_DISALLOW_COPY_AND_MOVE Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
…OVE Fi... Original subject: STYLE: Rename ITK_DISALLOW_COPY_AND_ASSIGN to ITK_DISALLOW_COPY_AND_MOVE Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
…OVE Fi... Original subject: STYLE: Rename ITK_DISALLOW_COPY_AND_ASSIGN to ITK_DISALLOW_COPY_AND_MOVE Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in #2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in #2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in #2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in #2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in #2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Fixes changes made in InsightSoftwareConsortium#2053. ITK_DISALLOW_COPY_AND_ASSIGN will be used if ITK_FUTURE_LEGACY_REMOVE=OFF.
Clarifies that the macro does not just disallow copy and assign, but
also move operations. Note that in this context, the term "move" refers
to both move-construct and move-assign.
With this commit, the old macro name will remain available, as long as
ITK_FUTURE_LEGACY_REMOVE = OFF(which is the default).