Closed jhlegarreta closed 5 months ago
@seanm Hopefully this will remove some of the 199 warnings on RogueResearch22.
Cool, thanks! I defer to C++ experts on the correctness of this change, but seems reasonable to me!
I'm sorry I think Region
should remain copyable, as long as it is being used as base class of ImageRegion
🤷
ImageRegion
hopefully no longer inherits from Region
: pull request #4344It's a bit cumbersome, but I guess the warnings will go away by adding four of those "explicitly defaulted" member functions to the public section:
Region(const Region &) = default;
Region(Region &&) = default;
Region& operator=(const Region &) = default;
Region& operator=(Region &&) = default;
https://github.com/InsightSoftwareConsortium/ITK/pull/4627#issuecomment-2085575522 :+1: Done. Thanks Niels.
/azp run ITK.Windows
Use the compiler-proved default implementations for
itk::Region
copy constructor, copy assignment, move constructor, and move assignment functions.As noted in [1], the C++ standard deprecated the implicit generation of copy and assignment operators.
Fixes:
And other similar warnings stemming from
itk::Region
that have been appearing consistently in some macOS site builds in the dashboard: https://open.cdash.org/viewBuildError.php?type=1&buildid=9579479[1] https://learn.microsoft.com/bs-latn-ba/cpp/error-messages/compiler-warnings/c5267?view=msvc-150#remarks
PR Checklist