Skip to content

Commit 34edbc8

Browse files
N-Dekkerthewtex
authored andcommitted
COMP: Make VariableLengthVector::AllocateElements ITK_FUTURE_DEPRECATED
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 #5863
1 parent 65353ea commit 34edbc8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Modules/Core/Common/include/itkVariableLengthVector.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,7 +770,8 @@ class ITK_TEMPLATE_EXPORT VariableLengthVector
770770
* parameter).
771771
* \deprecated Please consider calling `std::make_unique<TValue[]>(size)` instead.
772772
*/
773-
[[deprecated("Please consider calling `std::make_unique<TValue[]>(size)` instead.")]] [[nodiscard]] TValue *
773+
ITK_FUTURE_DEPRECATED("Please consider calling `std::make_unique<TValue[]>(size)` instead.")
774+
[[nodiscard]] TValue *
774775
AllocateElements(ElementIdentifier size) const;
775776
#endif
776777

0 commit comments

Comments
 (0)