diff --git a/Modules/Core/Common/include/itkMath.h b/Modules/Core/Common/include/itkMath.h index dd9eada10e5..60a15aaba1b 100644 --- a/Modules/Core/Common/include/itkMath.h +++ b/Modules/Core/Common/include/itkMath.h @@ -40,6 +40,7 @@ */ #include + namespace itk { namespace Math diff --git a/Modules/Core/Common/src/itkNumericTraits.cxx b/Modules/Core/Common/src/itkNumericTraits.cxx index bb70d4133a6..8fbaf9c5490 100644 --- a/Modules/Core/Common/src/itkNumericTraits.cxx +++ b/Modules/Core/Common/src/itkNumericTraits.cxx @@ -72,6 +72,8 @@ constexpr long double NumericTraits::Zero; constexpr long double NumericTraits::One; #if !defined(ITK_LEGACY_REMOVE) +// Supress MSVC warnings +# define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING template <> const std::complex NumericTraits>::Zero = std::complex(0, 0); template <> diff --git a/Modules/Core/Common/test/itkMathTest.cxx b/Modules/Core/Common/test/itkMathTest.cxx index e75ee4ec733..6bb6c3214c7 100644 --- a/Modules/Core/Common/test/itkMathTest.cxx +++ b/Modules/Core/Common/test/itkMathTest.cxx @@ -25,6 +25,11 @@ #include #include // For is_same. +#if !defined(ITK_LEGACY_REMOVE) +// Supress MSVC warnings +# define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING +#endif + constexpr auto maxUnsignedValue = std::numeric_limits::max(); using itk::Math::UnsignedPower; diff --git a/Modules/Core/Common/test/itkNumericTraitsTest.cxx b/Modules/Core/Common/test/itkNumericTraitsTest.cxx index f0580d8331a..f2c7831c2b3 100644 --- a/Modules/Core/Common/test/itkNumericTraitsTest.cxx +++ b/Modules/Core/Common/test/itkNumericTraitsTest.cxx @@ -36,6 +36,11 @@ #include "itkNumericTraitsVariableLengthVectorPixel.h" #include "itkTestingMacros.h" +#if !defined(ITK_LEGACY_REMOVE) +// Supress MSVC warnings +# define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING +#endif + namespace {