COMP: Make VariableLengthVector::AllocateElements ITK_FUTURE_DEPRECATED#5869
Conversation
This member function is only marked `ITK_FUTURE_LEGACY_REMOVE`, so using this
member function should only trigger a warning when legacy support is removed
_and_ `ITK_LEGACY_SILENT` is off.
Aims to fix warnings like:
itkVariableLengthVectorPython.cpp(5150): warning C4996: 'itk::VariableLengthVector::AllocateElements': Please consider calling `std::make_unique<TValue[]>(size)` instead.
At Windows_NT-Build4935-main-Python (https://open.cdash.org/builds/11095793)
As reported by Matt McCormick at pull request InsightSoftwareConsortium#5863
dzenanz
left a comment
There was a problem hiding this comment.
When was this deprecated? If it made its way into a released version, we should probably not walk back its "full" deprecation.
|
dzenanz
left a comment
There was a problem hiding this comment.
But we have to eventually do a "full" deprecation. Will these warning not appear then?
I believe the expectation of ITK_LEGACY_SILENT is to suppress all deprecation warnings. This is useful for dashboard builds. |
There are 3 phases, right?
I think the warning should only appear for users who choose to make one step forward, by setting ITK_LEGACY_REMOVE = ON. Once the functionality has become "legacy-only" (ITK_LEGACY_REMOVE), it becomes fully deprecated. Right? |
dzenanz
left a comment
There was a problem hiding this comment.
I am fine with the change, just making sure you though about these considerations.
9b60aa2
into
InsightSoftwareConsortium:main
This member function is only marked
ITK_FUTURE_LEGACY_REMOVE, so using this member function should only trigger a warning when legacy support is removed andITK_LEGACY_SILENTis off.Aims to fix warnings like:
At Windows_NT-Build4935-main-Python