Closed andrei-sandor closed 1 week ago
So the issue here is that -Wdocumentation
warns if a function/class is documented with a \deprecated
but isn't also tagged [[deprecated]]
for the compiler. Indeed, it generally makes sense that you should have both or neither.
But there are some tricky cases here:
This struct is "deprecated":
/**
* \brief A structure which enable changing any image class' pixel
* type to another.
*
*
* \sa Image::Rebind
* \deprecated Use template alias RebindImageType instead
*/
template <typename UPixelType, unsigned int VUImageDimension = VImageDimension>
struct Rebind
{
using Type = itk::VectorImage<UPixelType, VUImageDimension>;
};
but its replacement references the deprecated struct:
using RebindImageType = typename Rebind<UPixelType, VUImageDimension>::Type;
If the struct is tagged [[deprecated]]
then using it above triggers a warning about using a deprecated class.
What do you all think of just changing the \deprecated
in these cases to just Deprecated:
?
@andrei-sandor please amend the commit messge, as "COMP: Added ITK_DEPRECATED when \deprecated there" is no longer true.
/azp ITK.macOS
Added ITK_DEPRECATED when \deprecated is used in a comment. They must both come together. Applied to structs, classes and functions