From a38f1d12236c3ea8c7b373f93c2424cfa87e726e Mon Sep 17 00:00:00 2001 From: Niels Dekker Date: Fri, 6 Mar 2026 11:44:02 +0100 Subject: [PATCH] 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(size)` instead. At Windows_NT-Build4935-main-Python (https://open.cdash.org/builds/11095793) As reported by Matt McCormick at pull request https://github.com/InsightSoftwareConsortium/ITK/pull/5863 --- Modules/Core/Common/include/itkVariableLengthVector.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/Core/Common/include/itkVariableLengthVector.h b/Modules/Core/Common/include/itkVariableLengthVector.h index 24e6a0680ba..e1bfba39fcb 100644 --- a/Modules/Core/Common/include/itkVariableLengthVector.h +++ b/Modules/Core/Common/include/itkVariableLengthVector.h @@ -770,7 +770,8 @@ class ITK_TEMPLATE_EXPORT VariableLengthVector * parameter). * \deprecated Please consider calling `std::make_unique(size)` instead. */ - [[deprecated("Please consider calling `std::make_unique(size)` instead.")]] [[nodiscard]] TValue * + ITK_FUTURE_DEPRECATED("Please consider calling `std::make_unique(size)` instead.") + [[nodiscard]] TValue * AllocateElements(ElementIdentifier size) const; #endif