Skip to content

Commit

Permalink
STYLE: Deprecate (ITK_FUTURE_LEGACY_REMOVE) Unused(const T &)
Browse files Browse the repository at this point in the history
ITK itself does not call `Unused` anymore.
  • Loading branch information
N-Dekker authored and dzenanz committed Nov 8, 2023
1 parent a28242a commit 2803ebb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Modules/Core/Common/include/itkSingleton.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,18 @@
#include <map>
#include <functional>

#ifndef ITK_FUTURE_LEGACY_REMOVE
/** \brief A function which does nothing
* \deprecated Preferably use the C++ `[[maybe_unused]]` attribute instead!
*
* This function is to be used to mark parameters as unused to suppress
* compiler warning. It can be used when the parameter needs to be named
* (i.e. itkNotUsed cannot be used) but is not always used.
*/
template <typename T>
inline void
[[deprecated("Preferably use the C++ `[[maybe_unused]]` attribute instead!")]] inline void
Unused(const T &){};
#endif

namespace itk
{
Expand Down

0 comments on commit 2803ebb

Please sign in to comment.