Skip to content

Commit

Permalink
ENH: Add internal ITK_FUTURE_DEPRECATED(message) macro
Browse files Browse the repository at this point in the history
To be used instead of `[[deprecated(message)]]`, when a feature is marked
`ITK_FUTURE_LEGACY_REMOVE`.
  • Loading branch information
N-Dekker committed Dec 2, 2024
1 parent fffc65f commit 91fb524
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Modules/Core/Common/include/itkMacro.h
Original file line number Diff line number Diff line change
Expand Up @@ -1373,6 +1373,14 @@ itkDynamicCastInDebugMode(TSource x)
#endif
}
// ITK_FUTURE_DEPRECATED is only for internal use, within the implementation of ITK. It allows triggering "deprecated"
// warnings when legacy support is removed, which warn that a specific feature may be removed in the future.
#if defined(ITK_LEGACY_REMOVE) && !defined(ITK_LEGACY_SILENT)
# define ITK_FUTURE_DEPRECATED(message) [[deprecated(message)]]
#else
# define ITK_FUTURE_DEPRECATED(message)
#endif
#if __cplusplus >= 202002L
# define ITK_NODISCARD(message) [[nodiscard(message)]]
#else
Expand Down

0 comments on commit 91fb524

Please sign in to comment.