diff --git a/Modules/Core/Common/include/itkConceptChecking.h b/Modules/Core/Common/include/itkConceptChecking.h index 1c2a15b745e..88cd7d1aa32 100644 --- a/Modules/Core/Common/include/itkConceptChecking.h +++ b/Modules/Core/Common/include/itkConceptChecking.h @@ -702,6 +702,7 @@ struct HasNumericTraits void constraints() { + // This is here to cause compile-time failures, if a provided custom type is missing some methods. Detail::UniqueType::ValueType>(); Detail::UniqueType::PrintType>(); Detail::UniqueType::AbsType>(); @@ -709,6 +710,7 @@ struct HasNumericTraits Detail::UniqueType::RealType>(); Detail::UniqueType::ScalarRealType>(); Detail::UniqueType::FloatType>(); + T a{}; // Test these methods that take an instance of T to diff --git a/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.hxx b/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.hxx index b20e17b7aa9..680f148207b 100644 --- a/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.hxx +++ b/Modules/Core/ImageFunction/include/itkLinearInterpolateImageFunction.hxx @@ -51,8 +51,6 @@ LinearInterpolateImageFunction::EvaluateUnoptimized(co // When RealType is VariableLengthVector, 'value' will be resized properly // below when it's assigned again. - Concept::Detail::UniqueType::ScalarRealType>(); - RealType value; // Initialize variable "value" with overloaded function so that // in the case of variable length vectors the "value" is initialized diff --git a/Modules/Core/Mesh/test/itkParametricSpaceToImageSpaceMeshFilterTest.cxx b/Modules/Core/Mesh/test/itkParametricSpaceToImageSpaceMeshFilterTest.cxx index 5bbfc6cf411..7879515a788 100644 --- a/Modules/Core/Mesh/test/itkParametricSpaceToImageSpaceMeshFilterTest.cxx +++ b/Modules/Core/Mesh/test/itkParametricSpaceToImageSpaceMeshFilterTest.cxx @@ -29,7 +29,6 @@ struct helper template struct helper> { - static constexpr unsigned int Dimension = VDimension; using PositionType = itk::Index; template @@ -43,7 +42,6 @@ struct helper> template struct helper> { - static constexpr unsigned int Dimension = VDimension; using PositionType = itk::Point; template diff --git a/Modules/Filtering/ImageGrid/test/itkPasteImageFilterGTest.cxx b/Modules/Filtering/ImageGrid/test/itkPasteImageFilterGTest.cxx index 8166c8ed284..c2a517bf0ff 100644 --- a/Modules/Filtering/ImageGrid/test/itkPasteImageFilterGTest.cxx +++ b/Modules/Filtering/ImageGrid/test/itkPasteImageFilterGTest.cxx @@ -55,8 +55,6 @@ class PasteFixture : public ::testing::Test template struct FixtureUtilities { - static const unsigned int Dimension = TInputImage::ImageDimension; - using PixelType = typename TInputImage::PixelType; using OutputPixelType = PixelType; using InputImageType = TInputImage;