STYLE: Avoid repeating parent aliases in operator classes#2567
Conversation
08a6e45 to
830c693
Compare
cfcf52b to
cfa8825
Compare
45217ee to
abe65f2
Compare
hjmjohnson
left a comment
There was a problem hiding this comment.
This is a good start. Please cherry-pick the last two commits from https://github.com/hjmjohnson/ITK/tree/AvoidRepeatingParentAliasesInCommonOperators. does a more complete refactoring to keep the style and recommendations consistent.
Avoid repeating parent aliases in `Common` operator classes whenever
possible.
Use the preferred `using typename Superclass::{TypeAlias}` aliasing
form for the relevant type.
Make the `CoefficientVector` type be public in `itk::NeighborhoodOperator`
so that child classes can have access to it.
abe65f2 to
201537c
Compare
201537c to
0069817
Compare
Following ITK pull request InsightSoftwareConsortium/ITK#2567 "STYLE: Avoid repeating parent aliases..." commit InsightSoftwareConsortium/ITK@babece9 and InsightSoftwareConsortium/ITK@4f30980 Using Visual Studio 2019 Find and Replace regular expressions: typedef typename Superclass::(\w+)[ ]+\1; using typename Superclass::$1;
Following ITK pull request InsightSoftwareConsortium/ITK#2567 "STYLE: Avoid repeating parent aliases..." commit InsightSoftwareConsortium/ITK@babece9 and InsightSoftwareConsortium/ITK@4f30980 Using Visual Studio 2019 Find and Replace regular expressions: typedef typename Superclass::(\w+)[ ]+\1; using typename Superclass::$1;
Following ITK pull request InsightSoftwareConsortium/ITK#2567 "STYLE: Avoid repeating parent aliases..." commit InsightSoftwareConsortium/ITK@babece9 and InsightSoftwareConsortium/ITK@4f30980 Using Visual Studio 2019 Find and Replace regular expressions, like: typedef typename Superclass::(\w+)[ ]+\1; using typename Superclass::$1;
Following ITK pull request InsightSoftwareConsortium/ITK#2567 "STYLE: Avoid repeating parent aliases..." commit InsightSoftwareConsortium/ITK@babece9 and InsightSoftwareConsortium/ITK@4f30980 Using Visual Studio 2019 Find and Replace regular expressions, like: typedef Superclass::(\w+)[ ]+\1; using Superclass::$1;
Following ITK pull request InsightSoftwareConsortium/ITK#2567 "STYLE: Avoid repeating parent aliases..." commit InsightSoftwareConsortium/ITK@babece9 and InsightSoftwareConsortium/ITK@4f30980 Using Visual Studio 2019 Find and Replace regular expressions, like: typedef typename Superclass::(\w+)[ ]+\1; using typename Superclass::$1;
Following ITK pull request InsightSoftwareConsortium/ITK#2567 "STYLE: Avoid repeating parent aliases..." commit InsightSoftwareConsortium/ITK@babece9 and InsightSoftwareConsortium/ITK@4f30980 Using Visual Studio 2019 Find and Replace regular expressions, like: typedef typename Superclass::(\w+)[ ]+\1; using typename Superclass::$1;
Following ITK pull request InsightSoftwareConsortium/ITK#2567 "STYLE: Avoid repeating parent aliases..." commit InsightSoftwareConsortium/ITK@babece9 and InsightSoftwareConsortium/ITK@4f30980 Using Visual Studio 2019 Find and Replace regular expressions, like: typedef typename Superclass::(\w+)[ ]+\1; using typename Superclass::$1;
|
The CDash builds are not happy with this change 😟. As for the failure in I will submit a patch set for it later today. The rest of the failures to the reported 50 require more investigation. |
|
Oh, I just now see this. That's what happens when there are 30 new emails in the morning 😄 |
|
@hjmjohnson I had a quick look yesterday to the rest of the compilation errors, but was not able to come up with a solution. Can you please have a look? Thanks. |
|
I've just rebased #2753. Does the github-based CI have |
👍
Yep, I agree. I think it has been brought a few times before, e.g. #2653 (comment). But maybe there are reasons that are unknown to me that make enabling the |
|
Review module is fairly small now. I think we can enable it for the CI. PR incoming. |
Following ITK pull request InsightSoftwareConsortium/ITK#2567 "STYLE: Avoid repeating parent aliases..." commit InsightSoftwareConsortium/ITK@babece9 and InsightSoftwareConsortium/ITK@4f30980 Using Visual Studio 2019 Find and Replace regular expressions, like: typedef typename Superclass::(\w+)[ ]+\1; using typename Superclass::$1;
Following ITK pull request InsightSoftwareConsortium/ITK#2567 "STYLE: Avoid repeating parent aliases..." commit InsightSoftwareConsortium/ITK@babece9 and InsightSoftwareConsortium/ITK@4f30980 Using Visual Studio 2019 Find and Replace regular expressions, like: typedef typename Superclass::(\w+)[ ]+\1; using typename Superclass::$1;
Partially reverted pull request InsightSoftwareConsortium#2567 commit 4f30980 "STYLE: Avoid repeating parent aliases" because of Visual Studio 2017 compile errors reported by Dženan Zukić at InsightSoftwareConsortium#2759 "COMP: making it compile on VS2017" Worked around the following VS2017 compile errors: > error C2653: '...': is not a class or namespace name > error C2886: '...': symbol cannot be used in a member using-declaration The compiler bug that caused these errors is reported here: "Compile error when using "using declaration" referencing a base class type that refers to itself" EssentiaX - Reported March 12, 2019 [Fixed in version 16.2] https://developercommunity.visualstudio.com/t/486683
Partially reverted pull request #2567 commit 4f30980 "STYLE: Avoid repeating parent aliases" because of Visual Studio 2017 compile errors reported by Dženan Zukić at #2759 "COMP: making it compile on VS2017" Worked around the following VS2017 compile errors: > error C2653: '...': is not a class or namespace name > error C2886: '...': symbol cannot be used in a member using-declaration The compiler bug that caused these errors is reported here: "Compile error when using "using declaration" referencing a base class type that refers to itself" EssentiaX - Reported March 12, 2019 [Fixed in version 16.2] https://developercommunity.visualstudio.com/t/486683
Partially reverted pull request InsightSoftwareConsortium#2567 commit 77006be "STYLE: Avoid repeating parent aliases" because of Visual Studio 2017 compile errors reported by Dženan Zukić at InsightSoftwareConsortium#2759 "COMP: making it compile on VS2017" Worked around the following VS2017 compile errors: > error C2653: '...': is not a class or namespace name > error C2886: '...': symbol cannot be used in a member using-declaration The compiler bug that caused these errors is reported here: "Compile error when using "using declaration" referencing a base class type that refers to itself" EssentiaX - Reported March 12, 2019 [Fixed in version 16.2] https://developercommunity.visualstudio.com/t/486683
Avoid repeating parent aliases in
Commonoperator classes.PR Checklist