diff --git a/Modules/Core/Common/include/itkAutoPointer.h b/Modules/Core/Common/include/itkAutoPointer.h index 863917768c0..366b151a33b 100644 --- a/Modules/Core/Common/include/itkAutoPointer.h +++ b/Modules/Core/Common/include/itkAutoPointer.h @@ -33,10 +33,10 @@ namespace itk * to another AutoPointer when the assignement operator is used. * An AutoPointer can release ownership of the object it holds. * - * This class follows the design of the std::auto_ptr class. The main - * reason for not using the std version is to avoid templated methods, - * which greatly increase the difficulty of wrapping for Tcl, Python - * and Java. + * This class follows the design of the std::unique_ptr (auto_ptr being + * deprecated in C++11) class. The main * reason for not using the std + * version is to avoid templated methods, which greatly increase the + * difficulty of wrapping for Tcl, Python and Java. * * \ingroup ITKSystemObjects * \ingroup DataAccess diff --git a/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.h b/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.h index 6375d8c08b6..e57da42b937 100644 --- a/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.h +++ b/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.h @@ -68,8 +68,8 @@ class ITK_TEMPLATE_EXPORT AutoPointerDataObjectDecorator:public DataObject typedef SmartPointer< const Self > ConstPointer; /** Typedef for the component type (object being decorated) */ - typedef T ComponentType; - typedef std::auto_ptr< T > ComponentPointer; + typedef T ComponentType; + typedef std::unique_ptr< T > ComponentPointer; /** Method for creation through the object factory. */ itkNewMacro(Self); diff --git a/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.hxx b/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.hxx index 06d44dbd3e9..71e68c8dace 100644 --- a/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.hxx +++ b/Modules/Core/Common/include/itkAutoPointerDataObjectDecorator.hxx @@ -54,7 +54,7 @@ AutoPointerDataObjectDecorator< T > { // store the pointer and take ownership of the memory ComponentPointer aPointer(val); - m_Component = aPointer; + m_Component = std::move(aPointer); this->Modified(); } } diff --git a/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.h b/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.h index e69973d6eaf..c0a244bae5e 100644 --- a/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.h +++ b/Modules/Core/Common/include/itkConstShapedNeighborhoodIterator.h @@ -372,7 +372,7 @@ class ITK_TEMPLATE_EXPORT ConstShapedNeighborhoodIterator: ConstIterator m_ConstBeginIterator; private: /** Copy constructor */ - ConstShapedNeighborhoodIterator(const ConstShapedNeighborhoodIterator &) ITK_DELETED_FUNCTION; + ConstShapedNeighborhoodIterator(const ConstShapedNeighborhoodIterator &) = delete; }; } // namespace itk diff --git a/Modules/Core/Common/include/itkHexahedronCell.hxx b/Modules/Core/Common/include/itkHexahedronCell.hxx index cbb891cebde..ec3488e2d17 100644 --- a/Modules/Core/Common/include/itkHexahedronCell.hxx +++ b/Modules/Core/Common/include/itkHexahedronCell.hxx @@ -338,9 +338,9 @@ HexahedronCell< TCellInterface > double *dist2, InterpolationWeightType *weight) { - static ITK_CONSTEXPR_VAR int ITK_HEX_MAX_ITERATION = 10; - static ITK_CONSTEXPR_VAR double ITK_HEX_CONVERGED = 1.e-03; - static ITK_CONSTEXPR_VAR double ITK_DIVERGED = 1.e6; + static constexpr int ITK_HEX_MAX_ITERATION = 10; + static constexpr double ITK_HEX_CONVERGED = 1.e-03; + static constexpr double ITK_DIVERGED = 1.e6; int iteration, converged; double params[3]; diff --git a/Modules/Core/Common/include/itkImageAlgorithm.h b/Modules/Core/Common/include/itkImageAlgorithm.h index c678f041361..7e04fd89cab 100644 --- a/Modules/Core/Common/include/itkImageAlgorithm.h +++ b/Modules/Core/Common/include/itkImageAlgorithm.h @@ -190,7 +190,6 @@ struct ImageAlgorithm /** Unary functor just for static_cast operator */ template struct StaticCast - : public std::unary_function { TOutputType operator() (const TInputType i) { return static_cast(i); } }; diff --git a/Modules/Core/Common/include/itkIsBaseOf.h b/Modules/Core/Common/include/itkIsBaseOf.h index 63bb1afb364..c04dd303ddd 100644 --- a/Modules/Core/Common/include/itkIsBaseOf.h +++ b/Modules/Core/Common/include/itkIsBaseOf.h @@ -37,7 +37,7 @@ namespace mpl { template struct IsBaseOf { - static ITK_CONSTEXPR_VAR bool Value + static constexpr bool Value = IsConvertible::Value && ! IsSame::Value; }; diff --git a/Modules/Core/Common/include/itkIsConvertible.h b/Modules/Core/Common/include/itkIsConvertible.h index aeceef03fc1..eadd629f908 100644 --- a/Modules/Core/Common/include/itkIsConvertible.h +++ b/Modules/Core/Common/include/itkIsConvertible.h @@ -62,7 +62,7 @@ struct IsConvertible static TTwo Test(...); static TFrom MakeT(); public: - static ITK_CONSTEXPR_VAR bool Value = sizeof(Test(MakeT())) == sizeof(TOne); + static constexpr bool Value = sizeof(Test(MakeT())) == sizeof(TOne); }; } // end namespace mpl diff --git a/Modules/Core/Common/include/itkMacro.h b/Modules/Core/Common/include/itkMacro.h index 83333facbc0..5b877e75d4e 100644 --- a/Modules/Core/Common/include/itkMacro.h +++ b/Modules/Core/Common/include/itkMacro.h @@ -222,12 +222,12 @@ namespace itk //-*-*-* -#if ITK_COMPILER_CXX_CONSTEXPR +#if defined ( ITK_FUTURE_LEGACY_REMOVE ) #define ITK_CONSTEXPR_FUNC constexpr #define ITK_CONSTEXPR_VAR constexpr #else - #define ITK_CONSTEXPR_FUNC inline - #define ITK_CONSTEXPR_VAR const + #define ITK_CONSTEXPR_FUNC "Replace ITK_CONSTEXPR_FUNC with constexpr" + #define ITK_CONSTEXPR_VAR "Replace ITK_CONSTEXPR_VAR with constexpr" #endif // Use "ITK_FALLTHROUGH;" to annotate deliberate fall-through in switches, @@ -792,7 +792,7 @@ TTarget itkDynamicCastInDebugMode(TSource x) #if defined(__GNUC__) && ((__GNUC__ * 100) + __GNUC_MINOR__ ) < 405 && !defined( __clang__ ) && !defined( __INTEL_COMPILER ) # define itkStaticConstMacro(name,type,value) enum { name = value } #else -# define itkStaticConstMacro(name,type,value) static ITK_CONSTEXPR_VAR type name = value +# define itkStaticConstMacro(name,type,value) static constexpr type name = value #endif #define itkGetStaticConstMacro(name) (Self::name) diff --git a/Modules/Core/Common/include/itkMath.h b/Modules/Core/Common/include/itkMath.h index 9278c8dfb28..a84a343d436 100644 --- a/Modules/Core/Common/include/itkMath.h +++ b/Modules/Core/Common/include/itkMath.h @@ -53,52 +53,52 @@ namespace Math /** \brief \f[e\f] The base of the natural logarithm or Euler's number */ -static ITK_CONSTEXPR_VAR double e = vnl_math::e; +static constexpr double e = vnl_math::e; /** \brief \f[ \log_2 e \f] */ -static ITK_CONSTEXPR_VAR double log2e = vnl_math::log2e; +static constexpr double log2e = vnl_math::log2e; /** \brief \f[ \log_{10} e \f] */ -static ITK_CONSTEXPR_VAR double log10e = vnl_math::log10e; +static constexpr double log10e = vnl_math::log10e; /** \brief \f[ \log_e 2 \f] */ -static ITK_CONSTEXPR_VAR double ln2 = vnl_math::ln2; +static constexpr double ln2 = vnl_math::ln2; /** \brief \f[ \log_e 10 \f] */ -static ITK_CONSTEXPR_VAR double ln10 = vnl_math::ln10; +static constexpr double ln10 = vnl_math::ln10; /** \brief \f[ \pi \f] */ -static ITK_CONSTEXPR_VAR double pi = vnl_math::pi; +static constexpr double pi = vnl_math::pi; /** \brief \f[ 2\pi \f] */ -static ITK_CONSTEXPR_VAR double twopi = vnl_math::twopi; +static constexpr double twopi = vnl_math::twopi; /** \brief \f[ \frac{\pi}{2} \f] */ -static ITK_CONSTEXPR_VAR double pi_over_2 = vnl_math::pi_over_2; +static constexpr double pi_over_2 = vnl_math::pi_over_2; /** \brief \f[ \frac{\pi}{4} \f] */ -static ITK_CONSTEXPR_VAR double pi_over_4 = vnl_math::pi_over_4; +static constexpr double pi_over_4 = vnl_math::pi_over_4; /** \brief \f[ \frac{\pi}{180} \f] */ -static ITK_CONSTEXPR_VAR double pi_over_180 = vnl_math::pi_over_180; +static constexpr double pi_over_180 = vnl_math::pi_over_180; /** \brief \f[ \frac{1}{\pi} \f] */ -static ITK_CONSTEXPR_VAR double one_over_pi = vnl_math::one_over_pi; +static constexpr double one_over_pi = vnl_math::one_over_pi; /** \brief \f[ \frac{2}{\pi} \f] */ -static ITK_CONSTEXPR_VAR double two_over_pi = vnl_math::two_over_pi; +static constexpr double two_over_pi = vnl_math::two_over_pi; /** \brief \f[ \frac{180}{\pi} \f] */ -static ITK_CONSTEXPR_VAR double deg_per_rad = vnl_math::deg_per_rad; +static constexpr double deg_per_rad = vnl_math::deg_per_rad; /** \brief \f[ \sqrt{2\pi} \f] */ -static ITK_CONSTEXPR_VAR double sqrt2pi = vnl_math::sqrt2pi; +static constexpr double sqrt2pi = vnl_math::sqrt2pi; /** \brief \f[ \frac{2}{\sqrt{\pi}} \f] */ -static ITK_CONSTEXPR_VAR double two_over_sqrtpi = vnl_math::two_over_sqrtpi; +static constexpr double two_over_sqrtpi = vnl_math::two_over_sqrtpi; /** \brief \f[ \frac{2}{\sqrt{2\pi}} \f] */ -static ITK_CONSTEXPR_VAR double one_over_sqrt2pi = vnl_math::one_over_sqrt2pi; +static constexpr double one_over_sqrt2pi = vnl_math::one_over_sqrt2pi; /** \brief \f[ \sqrt{2} \f] */ -static ITK_CONSTEXPR_VAR double sqrt2 = vnl_math::sqrt2; +static constexpr double sqrt2 = vnl_math::sqrt2; /** \brief \f[ \sqrt{ \frac{1}{2}} \f] */ -static ITK_CONSTEXPR_VAR double sqrt1_2 = vnl_math::sqrt1_2; +static constexpr double sqrt1_2 = vnl_math::sqrt1_2; /** \brief \f[ \sqrt{ \frac{1}{3}} \f] */ -static ITK_CONSTEXPR_VAR double sqrt1_3 = vnl_math::sqrt1_3; +static constexpr double sqrt1_3 = vnl_math::sqrt1_3; /** \brief euler constant */ -static ITK_CONSTEXPR_VAR double euler = vnl_math::euler; +static constexpr double euler = vnl_math::euler; //: IEEE double machine precision -static ITK_CONSTEXPR_VAR double eps = vnl_math::eps; -static ITK_CONSTEXPR_VAR double sqrteps = vnl_math::sqrteps; +static constexpr double eps = vnl_math::eps; +static constexpr double sqrteps = vnl_math::sqrteps; //: IEEE single machine precision -static ITK_CONSTEXPR_VAR float float_eps = vnl_math::float_eps; -static ITK_CONSTEXPR_VAR float float_sqrteps = vnl_math::float_sqrteps; +static constexpr float float_eps = vnl_math::float_eps; +static constexpr float float_sqrteps = vnl_math::float_sqrteps; /** A useful macro to generate a template floating point to integer * conversion templated on the return type and using either the 32 @@ -507,10 +507,10 @@ struct AlmostEqualsFunctionSelector template struct AlmostEqualsScalarImplementer { - static ITK_CONSTEXPR_VAR bool TInputType1IsInteger = itk::NumericTraits::IsInteger; - static ITK_CONSTEXPR_VAR bool TInputType1IsSigned = itk::NumericTraits::IsSigned; - static ITK_CONSTEXPR_VAR bool TInputType2IsInteger = itk::NumericTraits::IsInteger; - static ITK_CONSTEXPR_VAR bool TInputType2IsSigned = itk::NumericTraits::IsSigned; + static constexpr bool TInputType1IsInteger = itk::NumericTraits::IsInteger; + static constexpr bool TInputType1IsSigned = itk::NumericTraits::IsSigned; + static constexpr bool TInputType2IsInteger = itk::NumericTraits::IsInteger; + static constexpr bool TInputType2IsSigned = itk::NumericTraits::IsSigned; typedef typename AlmostEqualsFunctionSelector< TInputType1IsInteger, TInputType1IsSigned, TInputType2IsInteger, TInputType2IsSigned >::SelectedVersion SelectedVersion; @@ -614,8 +614,8 @@ struct AlmostEqualsComplexChooser< true, false> template struct AlmostEqualsComplexImplementer { - static ITK_CONSTEXPR_VAR bool T1IsComplex = NumericTraits< T1 >::IsComplex; - static ITK_CONSTEXPR_VAR bool T2IsComplex = NumericTraits< T2 >::IsComplex; + static constexpr bool T1IsComplex = NumericTraits< T1 >::IsComplex; + static constexpr bool T2IsComplex = NumericTraits< T2 >::IsComplex; typedef typename AlmostEqualsComplexChooser< T1IsComplex, T2IsComplex >::ChosenVersion ChosenVersion; }; diff --git a/Modules/Core/Common/include/itkNumericTraits.h b/Modules/Core/Common/include/itkNumericTraits.h index 1524dc8a697..24aac28bbc5 100644 --- a/Modules/Core/Common/include/itkNumericTraits.h +++ b/Modules/Core/Common/include/itkNumericTraits.h @@ -24,11 +24,11 @@ #undef max #define itkNUMERIC_TRAITS_MIN_MAX_MACRO() \ - static ITK_CONSTEXPR_FUNC ValueType min(ValueType) \ + static constexpr ValueType min(ValueType) \ { \ return std::numeric_limits< ValueType >::min(); \ } \ - static ITK_CONSTEXPR_FUNC ValueType max(ValueType) \ + static constexpr ValueType max(ValueType) \ { \ return std::numeric_limits< ValueType >::max(); \ } \ @@ -36,12 +36,6 @@ using std::numeric_limits< ValueType >::max \ // Note: the last line is without a semicolon, as each macro call already ends with one. -#if ITK_COMPILER_CXX_CONSTEXPR -#define itkNUMERIC_TRAITS_C11_ASSINMENT(x) = x -#else -#define itkNUMERIC_TRAITS_C11_ASSINMENT(x) -#endif - #if !defined( ITK_LEGACY_FUTURE_REMOVE ) # include "vcl_limits.h" #endif @@ -102,13 +96,13 @@ class NumericTraits:public std::numeric_limits< T > typedef RealType ScalarRealType; /** Additive identity. */ - static const T Zero; + static const T ITKCommon_EXPORT Zero; /** Multiplicative identity. */ - static const T One; + static const T ITKCommon_EXPORT One; /** Smallest (most nonpositive) value */ - static ITK_CONSTEXPR_FUNC T NonpositiveMin() { return TraitsType::min(); } + static constexpr T NonpositiveMin() { return TraitsType::min(); } /** Is a given value positive? */ static bool IsPositive(T val) { return val > Zero; } @@ -125,17 +119,17 @@ class NumericTraits:public std::numeric_limits< T > /** Is a given type signed? -- default is no. For uniform array data types in ITK, the value of IsSigned is determined by the component elements of the array.*/ - static ITK_CONSTEXPR_VAR bool IsSigned = false; + static constexpr bool IsSigned = false; /** Is a given type an integer? -- default is no. For uniform array data types in ITK, the value of IsInteger is determined by the component elements of the array.*/ - static ITK_CONSTEXPR_VAR bool IsInteger = false; + static constexpr bool IsInteger = false; /** Is a given type complex? -- default is no. For uniform array data types in ITK, the value of IsComplex is determined by the component elements of the array.*/ - static ITK_CONSTEXPR_VAR bool IsComplex = false; + static constexpr bool IsComplex = false; /** Return zero value. This function should be used to support * RGBPixel type and standard types (not vectors) */ @@ -150,8 +144,8 @@ class NumericTraits:public std::numeric_limits< T > * its length is only known at run-time. Specializations of the * VariableLengthVector will provide a different implementation * where a vector of the correct size is built. */ - static ITK_CONSTEXPR_FUNC T max(const T &) { return TraitsType::max(); } - static ITK_CONSTEXPR_FUNC T min(const T &) { return TraitsType::min(); } + static constexpr T max(const T &) { return TraitsType::max(); } + static constexpr T min(const T &) { return TraitsType::min(); } /** Scalars cannot be resized, so an exception will * be thrown if the input size is not 1. If the size is valid @@ -240,28 +234,28 @@ class NumericTraits< bool > :public std::numeric_limits< bool > typedef float FloatType; typedef FixedArray MeasurementVectorType; - static ITK_CONSTEXPR_VAR bool Zero = false; - static ITK_CONSTEXPR_VAR bool One = true; - - static ITK_CONSTEXPR_FUNC bool min() { return false; } - static ITK_CONSTEXPR_FUNC bool max() { return true; } - static ITK_CONSTEXPR_FUNC bool min(bool) { return min(); } - static ITK_CONSTEXPR_FUNC bool max(bool) { return max(); } - static ITK_CONSTEXPR_FUNC bool NonpositiveMin() { return false; } - static ITK_CONSTEXPR_FUNC bool IsPositive(bool val) { return val; } - static ITK_CONSTEXPR_FUNC bool IsNonpositive(bool val) { return !val; } - static ITK_CONSTEXPR_FUNC bool IsNegative(bool val) { return val ? false : false; } - static ITK_CONSTEXPR_FUNC bool IsNonnegative(bool val) { return val ? true : true; } - static ITK_CONSTEXPR_VAR bool IsSigned = false; - static ITK_CONSTEXPR_VAR bool IsInteger = true; - static ITK_CONSTEXPR_VAR bool IsComplex = false; - static ITK_CONSTEXPR_FUNC bool ZeroValue() { return Zero; } - static ITK_CONSTEXPR_FUNC bool OneValue() { return One; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength(const ValueType &) { return 1; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength() { return 1; } - static ITK_CONSTEXPR_FUNC ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } - static ITK_CONSTEXPR_FUNC ValueType ZeroValue(const ValueType &) { return ZeroValue(); } - static ITK_CONSTEXPR_FUNC ValueType OneValue(const ValueType &) { return OneValue(); } + static constexpr bool ITKCommon_EXPORT Zero = false; + static constexpr bool ITKCommon_EXPORT One = true; + + static constexpr bool min() { return false; } + static constexpr bool max() { return true; } + static constexpr bool min(bool) { return min(); } + static constexpr bool max(bool) { return max(); } + static constexpr bool NonpositiveMin() { return false; } + static constexpr bool IsPositive(bool val) { return val; } + static constexpr bool IsNonpositive(bool val) { return !val; } + static constexpr bool IsNegative(bool val) { return val ? false : false; } + static constexpr bool IsNonnegative(bool val) { return val ? true : true; } + static constexpr bool IsSigned = false; + static constexpr bool IsInteger = true; + static constexpr bool IsComplex = false; + static constexpr bool ZeroValue() { return Zero; } + static constexpr bool OneValue() { return One; } + static constexpr unsigned int GetLength(const ValueType &) { return 1; } + static constexpr unsigned int GetLength() { return 1; } + static constexpr ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } + static constexpr ValueType ZeroValue(const ValueType &) { return ZeroValue(); } + static constexpr ValueType OneValue(const ValueType &) { return OneValue(); } template static void AssignToArray( const ValueType & v, TArray & mv ) @@ -297,33 +291,33 @@ class NumericTraits< char > :public std::numeric_limits< char > typedef float FloatType; typedef FixedArray MeasurementVectorType; - static ITK_CONSTEXPR_VAR char ITKCommon_EXPORT Zero = 0; - static ITK_CONSTEXPR_VAR char ITKCommon_EXPORT One = 1; + static constexpr char ITKCommon_EXPORT Zero = 0; + static constexpr char ITKCommon_EXPORT One = 1; itkNUMERIC_TRAITS_MIN_MAX_MACRO(); - static ITK_CONSTEXPR_FUNC char NonpositiveMin() { return min(); } - static ITK_CONSTEXPR_FUNC bool IsPositive(char val) { return val > Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonpositive(char val) { return val <= Zero; } + static constexpr char NonpositiveMin() { return min(); } + static constexpr bool IsPositive(char val) { return val > Zero; } + static constexpr bool IsNonpositive(char val) { return val <= Zero; } // char on PowerPC, for example, is not signed #if VCL_CHAR_IS_SIGNED - static ITK_CONSTEXPR_FUNC bool IsNegative(char val) { return val < Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonnegative(char val) { return val >= Zero; } - static ITK_CONSTEXPR_VAR bool IsSigned = true; + static constexpr bool IsNegative(char val) { return val < Zero; } + static constexpr bool IsNonnegative(char val) { return val >= Zero; } + static constexpr bool IsSigned = true; #else - static ITK_CONSTEXPR_FUNC bool IsNegative(char) { return false; } - static ITK_CONSTEXPR_FUNC bool IsNonnegative(char) { return true; } - static ITK_CONSTEXPR_VAR bool IsSigned = false; + static constexpr bool IsNegative(char) { return false; } + static constexpr bool IsNonnegative(char) { return true; } + static constexpr bool IsSigned = false; #endif - static ITK_CONSTEXPR_VAR bool IsInteger = true; - static ITK_CONSTEXPR_VAR bool IsComplex = false; - static ITK_CONSTEXPR_FUNC char ZeroValue() { return Zero; } - static ITK_CONSTEXPR_FUNC char OneValue() { return One; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength(const ValueType &) { return 1; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength() { return 1; } - static ITK_CONSTEXPR_FUNC ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } - static ITK_CONSTEXPR_FUNC ValueType ZeroValue(const ValueType &) { return ZeroValue(); } - static ITK_CONSTEXPR_FUNC ValueType OneValue(const ValueType &) { return OneValue(); } + static constexpr bool IsInteger = true; + static constexpr bool IsComplex = false; + static constexpr char ZeroValue() { return Zero; } + static constexpr char OneValue() { return One; } + static constexpr unsigned int GetLength(const ValueType &) { return 1; } + static constexpr unsigned int GetLength() { return 1; } + static constexpr ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } + static constexpr ValueType ZeroValue(const ValueType &) { return ZeroValue(); } + static constexpr ValueType OneValue(const ValueType &) { return OneValue(); } template static void AssignToArray( const ValueType & v, TArray & mv ) @@ -358,28 +352,28 @@ class NumericTraits< signed char > :public std::numeric_limits< signed char > typedef float FloatType; typedef FixedArray MeasurementVectorType; - static ITK_CONSTEXPR_VAR signed char ITKCommon_EXPORT Zero = 0; - static ITK_CONSTEXPR_VAR signed char ITKCommon_EXPORT One = 1; - - static ITK_CONSTEXPR_FUNC signed char min() { return -128; } - static ITK_CONSTEXPR_FUNC signed char max() { return 127; } - static ITK_CONSTEXPR_FUNC signed char min(signed char) { return min(); } - static ITK_CONSTEXPR_FUNC signed char max(signed char) { return max(); } - static ITK_CONSTEXPR_FUNC signed char NonpositiveMin() { return min(); } - static ITK_CONSTEXPR_FUNC bool IsPositive(signed char val) { return val > Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonpositive(signed char val) { return val <= Zero; } - static ITK_CONSTEXPR_FUNC bool IsNegative(signed char val) { return val < Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonnegative(signed char val) { return val >= Zero; } - static ITK_CONSTEXPR_VAR bool IsSigned = true; - static ITK_CONSTEXPR_VAR bool IsInteger = true; - static ITK_CONSTEXPR_VAR bool IsComplex = false; - static ITK_CONSTEXPR_FUNC signed char ZeroValue() { return Zero; } - static ITK_CONSTEXPR_FUNC signed char OneValue() { return One; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength(const ValueType &) { return 1; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength() { return 1; } - static ITK_CONSTEXPR_FUNC ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } - static ITK_CONSTEXPR_FUNC ValueType ZeroValue(const ValueType &) { return ZeroValue(); } - static ITK_CONSTEXPR_FUNC ValueType OneValue(const ValueType &) { return OneValue(); } + static constexpr signed char ITKCommon_EXPORT Zero = 0; + static constexpr signed char ITKCommon_EXPORT One = 1; + + static constexpr signed char min() { return -128; } + static constexpr signed char max() { return 127; } + static constexpr signed char min(signed char) { return min(); } + static constexpr signed char max(signed char) { return max(); } + static constexpr signed char NonpositiveMin() { return min(); } + static constexpr bool IsPositive(signed char val) { return val > Zero; } + static constexpr bool IsNonpositive(signed char val) { return val <= Zero; } + static constexpr bool IsNegative(signed char val) { return val < Zero; } + static constexpr bool IsNonnegative(signed char val) { return val >= Zero; } + static constexpr bool IsSigned = true; + static constexpr bool IsInteger = true; + static constexpr bool IsComplex = false; + static constexpr signed char ZeroValue() { return Zero; } + static constexpr signed char OneValue() { return One; } + static constexpr unsigned int GetLength(const ValueType &) { return 1; } + static constexpr unsigned int GetLength() { return 1; } + static constexpr ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } + static constexpr ValueType ZeroValue(const ValueType &) { return ZeroValue(); } + static constexpr ValueType OneValue(const ValueType &) { return OneValue(); } template static void AssignToArray( const ValueType & v, TArray & mv ) @@ -414,26 +408,26 @@ class NumericTraits< unsigned char > :public std::numeric_limits< unsigned char typedef float FloatType; typedef FixedArray MeasurementVectorType; - static ITK_CONSTEXPR_VAR unsigned char ITKCommon_EXPORT Zero = 0; - static ITK_CONSTEXPR_VAR unsigned char ITKCommon_EXPORT One = 1; + static constexpr unsigned char ITKCommon_EXPORT Zero = 0; + static constexpr unsigned char ITKCommon_EXPORT One = 1; itkNUMERIC_TRAITS_MIN_MAX_MACRO(); - static ITK_CONSTEXPR_FUNC unsigned char NonpositiveMin() { return std::numeric_limits< ValueType >::min(); } - static ITK_CONSTEXPR_FUNC bool IsPositive(unsigned char val) { return val != Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonpositive(unsigned char val) { return val == Zero; } - static ITK_CONSTEXPR_FUNC bool IsNegative(unsigned char val) { return val ? false : false; } - static ITK_CONSTEXPR_FUNC bool IsNonnegative(unsigned char val) { return val ? true : true; } - static ITK_CONSTEXPR_VAR bool IsSigned = false; - static ITK_CONSTEXPR_VAR bool IsInteger = true; - static ITK_CONSTEXPR_VAR bool IsComplex = false; - static ITK_CONSTEXPR_FUNC unsigned char ZeroValue() { return Zero; } - static ITK_CONSTEXPR_FUNC unsigned char OneValue() { return One; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength(const ValueType &) { return 1; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength() { return 1; } - static ITK_CONSTEXPR_FUNC ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } - static ITK_CONSTEXPR_FUNC ValueType ZeroValue(const ValueType &) { return ZeroValue(); } - static ITK_CONSTEXPR_FUNC ValueType OneValue(const ValueType &) { return OneValue(); } + static constexpr unsigned char NonpositiveMin() { return std::numeric_limits< ValueType >::min(); } + static constexpr bool IsPositive(unsigned char val) { return val != Zero; } + static constexpr bool IsNonpositive(unsigned char val) { return val == Zero; } + static constexpr bool IsNegative(unsigned char val) { return val ? false : false; } + static constexpr bool IsNonnegative(unsigned char val) { return val ? true : true; } + static constexpr bool IsSigned = false; + static constexpr bool IsInteger = true; + static constexpr bool IsComplex = false; + static constexpr unsigned char ZeroValue() { return Zero; } + static constexpr unsigned char OneValue() { return One; } + static constexpr unsigned int GetLength(const ValueType &) { return 1; } + static constexpr unsigned int GetLength() { return 1; } + static constexpr ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } + static constexpr ValueType ZeroValue(const ValueType &) { return ZeroValue(); } + static constexpr ValueType OneValue(const ValueType &) { return OneValue(); } template static void AssignToArray( const ValueType & v, TArray & mv ) @@ -467,25 +461,25 @@ class NumericTraits< short > :public std::numeric_limits< short > typedef float FloatType; typedef FixedArray MeasurementVectorType; - static ITK_CONSTEXPR_VAR short ITKCommon_EXPORT Zero = 0; - static ITK_CONSTEXPR_VAR short ITKCommon_EXPORT One = 1; + static constexpr short ITKCommon_EXPORT Zero = 0; + static constexpr short ITKCommon_EXPORT One = 1; itkNUMERIC_TRAITS_MIN_MAX_MACRO(); - static ITK_CONSTEXPR_FUNC short NonpositiveMin() { return std::numeric_limits< ValueType >::min(); } - static ITK_CONSTEXPR_FUNC bool IsPositive(short val) { return val > Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonpositive(short val) { return val <= Zero; } - static ITK_CONSTEXPR_FUNC bool IsNegative(short val) { return val < Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonnegative(short val) { return val >= Zero; } - static ITK_CONSTEXPR_VAR bool IsSigned = true; - static ITK_CONSTEXPR_VAR bool IsInteger = true; - static ITK_CONSTEXPR_VAR bool IsComplex = false; - static ITK_CONSTEXPR_FUNC short ZeroValue() { return Zero; } - static ITK_CONSTEXPR_FUNC short OneValue() { return One; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength(const ValueType &) { return 1; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength() { return 1; } - static ITK_CONSTEXPR_FUNC ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } - static ITK_CONSTEXPR_FUNC ValueType ZeroValue(const ValueType &) { return ZeroValue(); } - static ITK_CONSTEXPR_FUNC ValueType OneValue(const ValueType &) { return OneValue(); } + static constexpr short NonpositiveMin() { return std::numeric_limits< ValueType >::min(); } + static constexpr bool IsPositive(short val) { return val > Zero; } + static constexpr bool IsNonpositive(short val) { return val <= Zero; } + static constexpr bool IsNegative(short val) { return val < Zero; } + static constexpr bool IsNonnegative(short val) { return val >= Zero; } + static constexpr bool IsSigned = true; + static constexpr bool IsInteger = true; + static constexpr bool IsComplex = false; + static constexpr short ZeroValue() { return Zero; } + static constexpr short OneValue() { return One; } + static constexpr unsigned int GetLength(const ValueType &) { return 1; } + static constexpr unsigned int GetLength() { return 1; } + static constexpr ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } + static constexpr ValueType ZeroValue(const ValueType &) { return ZeroValue(); } + static constexpr ValueType OneValue(const ValueType &) { return OneValue(); } template static void AssignToArray( const ValueType & v, TArray & mv ) @@ -520,25 +514,25 @@ class NumericTraits< unsigned short > :public std::numeric_limits< unsigned shor typedef float FloatType; typedef FixedArray MeasurementVectorType; - static ITK_CONSTEXPR_VAR unsigned short ITKCommon_EXPORT Zero = 0; - static ITK_CONSTEXPR_VAR unsigned short ITKCommon_EXPORT One = 1; + static constexpr unsigned short ITKCommon_EXPORT Zero = 0; + static constexpr unsigned short ITKCommon_EXPORT One = 1; itkNUMERIC_TRAITS_MIN_MAX_MACRO(); - static ITK_CONSTEXPR_FUNC unsigned short NonpositiveMin() { return std::numeric_limits< ValueType >::min(); } - static ITK_CONSTEXPR_FUNC bool IsPositive(unsigned short val) { return val != Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonpositive(unsigned short val) { return val == Zero; } - static ITK_CONSTEXPR_FUNC bool IsNegative(unsigned short val) { return val ? false : false; } - static ITK_CONSTEXPR_FUNC bool IsNonnegative(unsigned short val) { return val ? true : true; } - static ITK_CONSTEXPR_VAR bool IsSigned = false; - static ITK_CONSTEXPR_VAR bool IsInteger = true; - static ITK_CONSTEXPR_VAR bool IsComplex = false; - static ITK_CONSTEXPR_FUNC unsigned short ZeroValue() { return Zero; } - static ITK_CONSTEXPR_FUNC unsigned short OneValue() { return One; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength(const ValueType &) { return 1; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength() { return 1; } - static ITK_CONSTEXPR_FUNC ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } - static ITK_CONSTEXPR_FUNC ValueType ZeroValue(const ValueType &) { return ZeroValue(); } - static ITK_CONSTEXPR_FUNC ValueType OneValue(const ValueType &) { return OneValue(); } + static constexpr unsigned short NonpositiveMin() { return std::numeric_limits< ValueType >::min(); } + static constexpr bool IsPositive(unsigned short val) { return val != Zero; } + static constexpr bool IsNonpositive(unsigned short val) { return val == Zero; } + static constexpr bool IsNegative(unsigned short val) { return val ? false : false; } + static constexpr bool IsNonnegative(unsigned short val) { return val ? true : true; } + static constexpr bool IsSigned = false; + static constexpr bool IsInteger = true; + static constexpr bool IsComplex = false; + static constexpr unsigned short ZeroValue() { return Zero; } + static constexpr unsigned short OneValue() { return One; } + static constexpr unsigned int GetLength(const ValueType &) { return 1; } + static constexpr unsigned int GetLength() { return 1; } + static constexpr ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } + static constexpr ValueType ZeroValue(const ValueType &) { return ZeroValue(); } + static constexpr ValueType OneValue(const ValueType &) { return OneValue(); } template static void AssignToArray( const ValueType & v, TArray & mv ) @@ -572,25 +566,25 @@ class NumericTraits< int > :public std::numeric_limits< int > typedef float FloatType; typedef FixedArray MeasurementVectorType; - static ITK_CONSTEXPR_VAR int ITKCommon_EXPORT Zero = 0; - static ITK_CONSTEXPR_VAR int ITKCommon_EXPORT One = 1; + static constexpr int ITKCommon_EXPORT Zero = 0; + static constexpr int ITKCommon_EXPORT One = 1; itkNUMERIC_TRAITS_MIN_MAX_MACRO(); - static ITK_CONSTEXPR_FUNC int NonpositiveMin() { return std::numeric_limits< ValueType >::min(); } - static ITK_CONSTEXPR_FUNC bool IsPositive(int val) { return val > Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonpositive(int val) { return val <= Zero; } - static ITK_CONSTEXPR_FUNC bool IsNegative(int val) { return val < Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonnegative(int val) { return val >= Zero; } - static ITK_CONSTEXPR_VAR bool IsSigned = true; - static ITK_CONSTEXPR_VAR bool IsInteger = true; - static ITK_CONSTEXPR_VAR bool IsComplex = false; - static ITK_CONSTEXPR_FUNC int ZeroValue() { return Zero; } - static ITK_CONSTEXPR_FUNC int OneValue() { return One; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength(const ValueType &) { return 1; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength() { return 1; } - static ITK_CONSTEXPR_FUNC ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } - static ITK_CONSTEXPR_FUNC ValueType ZeroValue(const ValueType &) { return ZeroValue(); } - static ITK_CONSTEXPR_FUNC ValueType OneValue(const ValueType &) { return OneValue(); } + static constexpr int NonpositiveMin() { return std::numeric_limits< ValueType >::min(); } + static constexpr bool IsPositive(int val) { return val > Zero; } + static constexpr bool IsNonpositive(int val) { return val <= Zero; } + static constexpr bool IsNegative(int val) { return val < Zero; } + static constexpr bool IsNonnegative(int val) { return val >= Zero; } + static constexpr bool IsSigned = true; + static constexpr bool IsInteger = true; + static constexpr bool IsComplex = false; + static constexpr int ZeroValue() { return Zero; } + static constexpr int OneValue() { return One; } + static constexpr unsigned int GetLength(const ValueType &) { return 1; } + static constexpr unsigned int GetLength() { return 1; } + static constexpr ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } + static constexpr ValueType ZeroValue(const ValueType &) { return ZeroValue(); } + static constexpr ValueType OneValue(const ValueType &) { return OneValue(); } template static void AssignToArray( const ValueType & v, TArray & mv ) @@ -625,28 +619,28 @@ class NumericTraits< unsigned int > :public std::numeric_limits< unsigned int > typedef float FloatType; typedef FixedArray MeasurementVectorType; - static ITK_CONSTEXPR_VAR unsigned int ITKCommon_EXPORT Zero = 0; - static ITK_CONSTEXPR_VAR unsigned int ITKCommon_EXPORT One = 1; - - static ITK_CONSTEXPR_FUNC unsigned int min(void) { return 0; } - static ITK_CONSTEXPR_FUNC unsigned int max(void) { return static_cast< unsigned int >( -1 ); } - static ITK_CONSTEXPR_FUNC unsigned int min(unsigned int) { return std::numeric_limits< ValueType >::min(); } - static ITK_CONSTEXPR_FUNC unsigned int max(unsigned int) { return std::numeric_limits< ValueType >::max(); } - static ITK_CONSTEXPR_FUNC unsigned int NonpositiveMin() { return 0; } - static ITK_CONSTEXPR_FUNC bool IsPositive(unsigned int val) { return val != Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonpositive(unsigned int val) { return val == Zero; } - static ITK_CONSTEXPR_FUNC bool IsNegative(unsigned int val) { return val ? false : false; } - static ITK_CONSTEXPR_FUNC bool IsNonnegative(unsigned int val) { return val ? true : true; } - static ITK_CONSTEXPR_VAR bool IsSigned = false; - static ITK_CONSTEXPR_VAR bool IsInteger = true; - static ITK_CONSTEXPR_VAR bool IsComplex = false; - static ITK_CONSTEXPR_FUNC unsigned int ZeroValue() { return Zero; } - static ITK_CONSTEXPR_FUNC unsigned int OneValue() { return One; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength(const ValueType &) { return 1; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength() { return 1; } - static ITK_CONSTEXPR_FUNC ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } - static ITK_CONSTEXPR_FUNC ValueType ZeroValue(const ValueType &) { return ZeroValue(); } - static ITK_CONSTEXPR_FUNC ValueType OneValue(const ValueType &) { return OneValue(); } + static constexpr unsigned int ITKCommon_EXPORT Zero = 0; + static constexpr unsigned int ITKCommon_EXPORT One = 1; + + static constexpr unsigned int min(void) { return 0; } + static constexpr unsigned int max(void) { return static_cast< unsigned int >( -1 ); } + static constexpr unsigned int min(unsigned int) { return std::numeric_limits< ValueType >::min(); } + static constexpr unsigned int max(unsigned int) { return std::numeric_limits< ValueType >::max(); } + static constexpr unsigned int NonpositiveMin() { return 0; } + static constexpr bool IsPositive(unsigned int val) { return val != Zero; } + static constexpr bool IsNonpositive(unsigned int val) { return val == Zero; } + static constexpr bool IsNegative(unsigned int val) { return val ? false : false; } + static constexpr bool IsNonnegative(unsigned int val) { return val ? true : true; } + static constexpr bool IsSigned = false; + static constexpr bool IsInteger = true; + static constexpr bool IsComplex = false; + static constexpr unsigned int ZeroValue() { return Zero; } + static constexpr unsigned int OneValue() { return One; } + static constexpr unsigned int GetLength(const ValueType &) { return 1; } + static constexpr unsigned int GetLength() { return 1; } + static constexpr ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } + static constexpr ValueType ZeroValue(const ValueType &) { return ZeroValue(); } + static constexpr ValueType OneValue(const ValueType &) { return OneValue(); } template static void AssignToArray( const ValueType & v, TArray & mv ) @@ -681,25 +675,25 @@ class NumericTraits< long > :public std::numeric_limits< long > typedef float FloatType; typedef FixedArray MeasurementVectorType; - static ITK_CONSTEXPR_VAR long ITKCommon_EXPORT Zero = 0L; - static ITK_CONSTEXPR_VAR long ITKCommon_EXPORT One = 1L; + static constexpr long ITKCommon_EXPORT Zero = 0L; + static constexpr long ITKCommon_EXPORT One = 1L; itkNUMERIC_TRAITS_MIN_MAX_MACRO(); - static ITK_CONSTEXPR_FUNC long NonpositiveMin() { return std::numeric_limits< ValueType >::min(); } - static ITK_CONSTEXPR_FUNC bool IsPositive(long val) { return val > Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonpositive(long val) { return val <= Zero; } - static ITK_CONSTEXPR_FUNC bool IsNegative(long val) { return val < Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonnegative(long val) { return val >= Zero; } - static ITK_CONSTEXPR_VAR bool IsSigned = true; - static ITK_CONSTEXPR_VAR bool IsInteger = true; - static ITK_CONSTEXPR_VAR bool IsComplex = false; - static ITK_CONSTEXPR_FUNC long ZeroValue() { return Zero; } - static ITK_CONSTEXPR_FUNC long OneValue() { return One; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength(const ValueType &) { return 1; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength() { return 1; } - static ITK_CONSTEXPR_FUNC ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } - static ITK_CONSTEXPR_FUNC ValueType ZeroValue(const ValueType &) { return ZeroValue(); } - static ITK_CONSTEXPR_FUNC ValueType OneValue(const ValueType &) { return OneValue(); } + static constexpr long NonpositiveMin() { return std::numeric_limits< ValueType >::min(); } + static constexpr bool IsPositive(long val) { return val > Zero; } + static constexpr bool IsNonpositive(long val) { return val <= Zero; } + static constexpr bool IsNegative(long val) { return val < Zero; } + static constexpr bool IsNonnegative(long val) { return val >= Zero; } + static constexpr bool IsSigned = true; + static constexpr bool IsInteger = true; + static constexpr bool IsComplex = false; + static constexpr long ZeroValue() { return Zero; } + static constexpr long OneValue() { return One; } + static constexpr unsigned int GetLength(const ValueType &) { return 1; } + static constexpr unsigned int GetLength() { return 1; } + static constexpr ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } + static constexpr ValueType ZeroValue(const ValueType &) { return ZeroValue(); } + static constexpr ValueType OneValue(const ValueType &) { return OneValue(); } template static void AssignToArray( const ValueType & v, TArray & mv ) @@ -734,25 +728,25 @@ class NumericTraits< unsigned long > :public std::numeric_limits< unsigned long typedef float FloatType; typedef FixedArray MeasurementVectorType; - static ITK_CONSTEXPR_VAR unsigned long ITKCommon_EXPORT Zero = 0UL; - static ITK_CONSTEXPR_VAR unsigned long ITKCommon_EXPORT One = 1UL; + static constexpr unsigned long ITKCommon_EXPORT Zero = 0UL; + static constexpr unsigned long ITKCommon_EXPORT One = 1UL; itkNUMERIC_TRAITS_MIN_MAX_MACRO(); - static ITK_CONSTEXPR_FUNC unsigned long NonpositiveMin() { return std::numeric_limits< ValueType >::min(); } - static ITK_CONSTEXPR_FUNC bool IsPositive(unsigned long val) { return val != Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonpositive(unsigned long val) { return val == Zero; } - static ITK_CONSTEXPR_FUNC bool IsNegative(unsigned long) { return false; } - static ITK_CONSTEXPR_FUNC bool IsNonnegative(unsigned long) { return true; } - static ITK_CONSTEXPR_VAR bool IsSigned = false; - static ITK_CONSTEXPR_VAR bool IsInteger = true; - static ITK_CONSTEXPR_VAR bool IsComplex = false; - static ITK_CONSTEXPR_FUNC unsigned long ZeroValue() { return Zero; } - static ITK_CONSTEXPR_FUNC unsigned long OneValue() { return One; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength(const ValueType &) { return 1; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength() { return 1; } - static ITK_CONSTEXPR_FUNC ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } - static ITK_CONSTEXPR_FUNC ValueType ZeroValue(const ValueType &) { return ZeroValue(); } - static ITK_CONSTEXPR_FUNC ValueType OneValue(const ValueType &) { return OneValue(); } + static constexpr unsigned long NonpositiveMin() { return std::numeric_limits< ValueType >::min(); } + static constexpr bool IsPositive(unsigned long val) { return val != Zero; } + static constexpr bool IsNonpositive(unsigned long val) { return val == Zero; } + static constexpr bool IsNegative(unsigned long) { return false; } + static constexpr bool IsNonnegative(unsigned long) { return true; } + static constexpr bool IsSigned = false; + static constexpr bool IsInteger = true; + static constexpr bool IsComplex = false; + static constexpr unsigned long ZeroValue() { return Zero; } + static constexpr unsigned long OneValue() { return One; } + static constexpr unsigned int GetLength(const ValueType &) { return 1; } + static constexpr unsigned int GetLength() { return 1; } + static constexpr ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } + static constexpr ValueType ZeroValue(const ValueType &) { return ZeroValue(); } + static constexpr ValueType OneValue(const ValueType &) { return OneValue(); } template static void AssignToArray( const ValueType & v, TArray & mv ) @@ -788,25 +782,25 @@ class NumericTraits< float > :public std::numeric_limits< float > typedef FixedArray MeasurementVectorType; - static ITK_CONSTEXPR_VAR float ITKCommon_EXPORT Zero itkNUMERIC_TRAITS_C11_ASSINMENT(0.0f); - static ITK_CONSTEXPR_VAR float ITKCommon_EXPORT One itkNUMERIC_TRAITS_C11_ASSINMENT(1.0f); + static constexpr float ITKCommon_EXPORT Zero =0.0f; + static constexpr float ITKCommon_EXPORT One =1.0f; itkNUMERIC_TRAITS_MIN_MAX_MACRO(); - static ITK_CONSTEXPR_FUNC float NonpositiveMin() { return -std::numeric_limits< ValueType >::max(); } - static ITK_CONSTEXPR_FUNC bool IsPositive(float val) { return val > Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonpositive(float val) { return val <= Zero; } - static ITK_CONSTEXPR_FUNC bool IsNegative(float val) { return val < Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonnegative(float val) { return val >= Zero; } - static ITK_CONSTEXPR_VAR bool IsSigned = true; - static ITK_CONSTEXPR_VAR bool IsInteger = false; - static ITK_CONSTEXPR_VAR bool IsComplex = false; - static ITK_CONSTEXPR_FUNC float ZeroValue() { return Zero; } - static ITK_CONSTEXPR_FUNC float OneValue() { return One; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength(const ValueType &) { return 1; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength() { return 1; } - static ITK_CONSTEXPR_FUNC ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } - static ITK_CONSTEXPR_FUNC ValueType ZeroValue(const ValueType &) { return ZeroValue(); } - static ITK_CONSTEXPR_FUNC ValueType OneValue(const ValueType &) { return OneValue(); } + static constexpr float NonpositiveMin() { return -std::numeric_limits< ValueType >::max(); } + static constexpr bool IsPositive(float val) { return val > Zero; } + static constexpr bool IsNonpositive(float val) { return val <= Zero; } + static constexpr bool IsNegative(float val) { return val < Zero; } + static constexpr bool IsNonnegative(float val) { return val >= Zero; } + static constexpr bool IsSigned = true; + static constexpr bool IsInteger = false; + static constexpr bool IsComplex = false; + static constexpr float ZeroValue() { return Zero; } + static constexpr float OneValue() { return One; } + static constexpr unsigned int GetLength(const ValueType &) { return 1; } + static constexpr unsigned int GetLength() { return 1; } + static constexpr ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } + static constexpr ValueType ZeroValue(const ValueType &) { return ZeroValue(); } + static constexpr ValueType OneValue(const ValueType &) { return OneValue(); } template static void AssignToArray( const ValueType & v, TArray & mv ) @@ -841,25 +835,25 @@ class NumericTraits< double > :public std::numeric_limits< double > typedef float FloatType; typedef FixedArray MeasurementVectorType; - static ITK_CONSTEXPR_VAR double ITKCommon_EXPORT Zero itkNUMERIC_TRAITS_C11_ASSINMENT(0.0); - static ITK_CONSTEXPR_VAR double ITKCommon_EXPORT One itkNUMERIC_TRAITS_C11_ASSINMENT(1.0); + static constexpr double ITKCommon_EXPORT Zero = 0.0; + static constexpr double ITKCommon_EXPORT One = 1.0; itkNUMERIC_TRAITS_MIN_MAX_MACRO(); - static ITK_CONSTEXPR_FUNC double NonpositiveMin() { return -std::numeric_limits< ValueType >::max(); } - static ITK_CONSTEXPR_FUNC bool IsPositive(double val) { return val > Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonpositive(double val) { return val <= Zero; } - static ITK_CONSTEXPR_FUNC bool IsNegative(double val) { return val < Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonnegative(double val) { return val >= Zero; } - static ITK_CONSTEXPR_VAR bool IsSigned = true; - static ITK_CONSTEXPR_VAR bool IsInteger = false; - static ITK_CONSTEXPR_VAR bool IsComplex = false; - static ITK_CONSTEXPR_FUNC double ZeroValue() { return Zero; } - static ITK_CONSTEXPR_FUNC double OneValue() { return One; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength(const ValueType &) { return 1; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength() { return 1; } - static ITK_CONSTEXPR_FUNC ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } - static ITK_CONSTEXPR_FUNC ValueType ZeroValue(const ValueType &) { return ZeroValue(); } - static ITK_CONSTEXPR_FUNC ValueType OneValue(const ValueType &) { return OneValue(); } + static constexpr double NonpositiveMin() { return -std::numeric_limits< ValueType >::max(); } + static constexpr bool IsPositive(double val) { return val > Zero; } + static constexpr bool IsNonpositive(double val) { return val <= Zero; } + static constexpr bool IsNegative(double val) { return val < Zero; } + static constexpr bool IsNonnegative(double val) { return val >= Zero; } + static constexpr bool IsSigned = true; + static constexpr bool IsInteger = false; + static constexpr bool IsComplex = false; + static constexpr double ZeroValue() { return Zero; } + static constexpr double OneValue() { return One; } + static constexpr unsigned int GetLength(const ValueType &) { return 1; } + static constexpr unsigned int GetLength() { return 1; } + static constexpr ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } + static constexpr ValueType ZeroValue(const ValueType &) { return ZeroValue(); } + static constexpr ValueType OneValue(const ValueType &) { return OneValue(); } template static void AssignToArray( const ValueType & v, TArray & mv ) @@ -902,25 +896,25 @@ class NumericTraits< long double > :public std::numeric_limits< long double > typedef float FloatType; typedef FixedArray MeasurementVectorType; - static ITK_CONSTEXPR_VAR long double ITKCommon_EXPORT Zero itkNUMERIC_TRAITS_C11_ASSINMENT(0.0); - static ITK_CONSTEXPR_VAR long double ITKCommon_EXPORT One itkNUMERIC_TRAITS_C11_ASSINMENT(1.0); + static constexpr long double ITKCommon_EXPORT Zero = 0.0; + static constexpr long double ITKCommon_EXPORT One = 1.0; itkNUMERIC_TRAITS_MIN_MAX_MACRO(); - static ITK_CONSTEXPR_FUNC long double NonpositiveMin() { return -std::numeric_limits< ValueType >::max(); } - static ITK_CONSTEXPR_FUNC bool IsPositive(long double val) { return val > Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonpositive(long double val) { return val <= Zero; } - static ITK_CONSTEXPR_FUNC bool IsNegative(long double val) { return val < Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonnegative(long double val) { return val >= Zero; } - static ITK_CONSTEXPR_VAR bool IsSigned = true; - static ITK_CONSTEXPR_VAR bool IsInteger = false; - static ITK_CONSTEXPR_VAR bool IsComplex = false; - static ITK_CONSTEXPR_FUNC long double ZeroValue() { return Zero; } - static ITK_CONSTEXPR_FUNC long double OneValue() { return One; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength(const ValueType &) { return 1; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength() { return 1; } - static ITK_CONSTEXPR_FUNC ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } - static ITK_CONSTEXPR_FUNC ValueType ZeroValue(const ValueType &) { return ZeroValue(); } - static ITK_CONSTEXPR_FUNC ValueType OneValue(const ValueType &) { return OneValue(); } + static constexpr long double NonpositiveMin() { return -std::numeric_limits< ValueType >::max(); } + static constexpr bool IsPositive(long double val) { return val > Zero; } + static constexpr bool IsNonpositive(long double val) { return val <= Zero; } + static constexpr bool IsNegative(long double val) { return val < Zero; } + static constexpr bool IsNonnegative(long double val) { return val >= Zero; } + static constexpr bool IsSigned = true; + static constexpr bool IsInteger = false; + static constexpr bool IsComplex = false; + static constexpr long double ZeroValue() { return Zero; } + static constexpr long double OneValue() { return One; } + static constexpr unsigned int GetLength(const ValueType &) { return 1; } + static constexpr unsigned int GetLength() { return 1; } + static constexpr ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } + static constexpr ValueType ZeroValue(const ValueType &) { return ZeroValue(); } + static constexpr ValueType OneValue(const ValueType &) { return OneValue(); } template static void AssignToArray( const ValueType & v, TArray & mv ) @@ -957,25 +951,25 @@ class NumericTraits< long long > : typedef float FloatType; typedef FixedArray MeasurementVectorType; - static ITK_CONSTEXPR_VAR ValueType ITKCommon_EXPORT Zero = 0LL; - static ITK_CONSTEXPR_VAR ValueType ITKCommon_EXPORT One = 1LL; + static constexpr ValueType ITKCommon_EXPORT Zero = 0LL; + static constexpr ValueType ITKCommon_EXPORT One = 1LL; itkNUMERIC_TRAITS_MIN_MAX_MACRO(); - static ITK_CONSTEXPR_FUNC ValueType NonpositiveMin() { return std::numeric_limits< ValueType >::min(); } - static ITK_CONSTEXPR_FUNC bool IsPositive(ValueType val) { return val > Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonpositive(ValueType val) { return val <= Zero; } - static ITK_CONSTEXPR_FUNC bool IsNegative(ValueType val) { return val < Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonnegative(ValueType val) { return val >= Zero; } - static ITK_CONSTEXPR_VAR bool IsSigned = true; - static ITK_CONSTEXPR_VAR bool IsInteger = true; - static ITK_CONSTEXPR_VAR bool IsComplex = false; - static ITK_CONSTEXPR_FUNC ValueType ZeroValue() { return Zero; } - static ITK_CONSTEXPR_FUNC ValueType OneValue() { return One; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength(const ValueType &) { return 1; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength() { return 1; } - static ITK_CONSTEXPR_FUNC ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } - static ITK_CONSTEXPR_FUNC ValueType ZeroValue(const ValueType &) { return ZeroValue(); } - static ITK_CONSTEXPR_FUNC ValueType OneValue(const ValueType &) { return OneValue(); } + static constexpr ValueType NonpositiveMin() { return std::numeric_limits< ValueType >::min(); } + static constexpr bool IsPositive(ValueType val) { return val > Zero; } + static constexpr bool IsNonpositive(ValueType val) { return val <= Zero; } + static constexpr bool IsNegative(ValueType val) { return val < Zero; } + static constexpr bool IsNonnegative(ValueType val) { return val >= Zero; } + static constexpr bool IsSigned = true; + static constexpr bool IsInteger = true; + static constexpr bool IsComplex = false; + static constexpr ValueType ZeroValue() { return Zero; } + static constexpr ValueType OneValue() { return One; } + static constexpr unsigned int GetLength(const ValueType &) { return 1; } + static constexpr unsigned int GetLength() { return 1; } + static constexpr ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } + static constexpr ValueType ZeroValue(const ValueType &) { return ZeroValue(); } + static constexpr ValueType OneValue(const ValueType &) { return OneValue(); } template static void AssignToArray( const ValueType & v, TArray & mv ) @@ -1011,25 +1005,25 @@ class NumericTraits< unsigned long long > : typedef float FloatType; typedef FixedArray MeasurementVectorType; - static ITK_CONSTEXPR_VAR ValueType ITKCommon_EXPORT Zero = 0ULL; - static ITK_CONSTEXPR_VAR ValueType ITKCommon_EXPORT One = 1ULL; + static constexpr ValueType ITKCommon_EXPORT Zero = 0ULL; + static constexpr ValueType ITKCommon_EXPORT One = 1ULL; itkNUMERIC_TRAITS_MIN_MAX_MACRO(); - static ITK_CONSTEXPR_FUNC ValueType NonpositiveMin() { return std::numeric_limits< ValueType >::min(); } - static ITK_CONSTEXPR_FUNC bool IsPositive(ValueType val) { return val != Zero; } - static ITK_CONSTEXPR_FUNC bool IsNonpositive(ValueType val) { return val == Zero; } - static ITK_CONSTEXPR_FUNC bool IsNegative(ValueType) { return false; } - static ITK_CONSTEXPR_FUNC bool IsNonnegative(ValueType) { return true; } - static ITK_CONSTEXPR_VAR bool IsSigned = false; - static ITK_CONSTEXPR_VAR bool IsInteger = true; - static ITK_CONSTEXPR_VAR bool IsComplex = false; - static ITK_CONSTEXPR_FUNC ValueType ZeroValue() { return Zero; } - static ITK_CONSTEXPR_FUNC ValueType OneValue() { return One; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength(const ValueType &) { return 1; } - static ITK_CONSTEXPR_FUNC unsigned int GetLength() { return 1; } - static ITK_CONSTEXPR_FUNC ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } - static ITK_CONSTEXPR_FUNC ValueType ZeroValue(const ValueType &) { return ZeroValue(); } - static ITK_CONSTEXPR_FUNC ValueType OneValue(const ValueType &) { return OneValue(); } + static constexpr ValueType NonpositiveMin() { return std::numeric_limits< ValueType >::min(); } + static constexpr bool IsPositive(ValueType val) { return val != Zero; } + static constexpr bool IsNonpositive(ValueType val) { return val == Zero; } + static constexpr bool IsNegative(ValueType) { return false; } + static constexpr bool IsNonnegative(ValueType) { return true; } + static constexpr bool IsSigned = false; + static constexpr bool IsInteger = true; + static constexpr bool IsComplex = false; + static constexpr ValueType ZeroValue() { return Zero; } + static constexpr ValueType OneValue() { return One; } + static constexpr unsigned int GetLength(const ValueType &) { return 1; } + static constexpr unsigned int GetLength() { return 1; } + static constexpr ValueType NonpositiveMin(const ValueType &) { return NonpositiveMin(); } + static constexpr ValueType ZeroValue(const ValueType &) { return ZeroValue(); } + static constexpr ValueType OneValue(const ValueType &) { return OneValue(); } template static void AssignToArray( const ValueType & v, TArray & mv ) @@ -1090,9 +1084,9 @@ class NumericTraits< std::complex< char > > static bool IsNegative(Self) { return false; } static bool IsNonnegative(Self) { return true; } #endif - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = false; - static ITK_CONSTEXPR_VAR bool IsComplex = true; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = false; + static constexpr bool IsComplex = true; static Self ZeroValue() { return Zero; } static Self OneValue() { return One; } static unsigned int GetLength(const Self &) { return 2; } @@ -1153,9 +1147,9 @@ class NumericTraits< std::complex< unsigned char > > static bool IsNonpositive(Self val) { return val.real() == 0; } static bool IsNegative(Self) { return false; } static bool IsNonnegative(Self) { return true; } - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = false; - static ITK_CONSTEXPR_VAR bool IsComplex = true; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = false; + static constexpr bool IsComplex = true; static Self ZeroValue() { return Zero; } static Self OneValue() { return One; } static unsigned int GetLength(const Self &) { return 2; } @@ -1216,9 +1210,9 @@ class NumericTraits< std::complex< short > > static bool IsNonpositive(Self val) { return val.real() <= 0; } static bool IsNegative(Self val) { return val.real() < 0; } static bool IsNonnegative(Self val) { return val.real() >= 0; } - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = false; - static ITK_CONSTEXPR_VAR bool IsComplex = true; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = false; + static constexpr bool IsComplex = true; static Self ZeroValue() { return Zero; } static Self OneValue() { return One; } static unsigned int GetLength(const Self &) { return 2; } @@ -1279,9 +1273,9 @@ class NumericTraits< std::complex< unsigned short > > static bool IsNonpositive(Self val) { return val.real() == 0; } static bool IsNegative(Self) { return false; } static bool IsNonnegative(Self) { return true; } - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = false; - static ITK_CONSTEXPR_VAR bool IsComplex = true; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = false; + static constexpr bool IsComplex = true; static Self ZeroValue() { return Zero; } static Self OneValue() { return One; } static unsigned int GetLength(const Self &) { return 2; } @@ -1342,9 +1336,9 @@ class NumericTraits< std::complex< int > > static bool IsNonpositive(Self val) { return val.real() <= 0; } static bool IsNegative(Self val) { return val.real() < 0; } static bool IsNonnegative(Self val) { return val.real() >= 0; } - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = false; - static ITK_CONSTEXPR_VAR bool IsComplex = true; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = false; + static constexpr bool IsComplex = true; static Self ZeroValue() { return Zero; } static Self OneValue() { return One; } static unsigned int GetLength(const Self &) { return 2; } @@ -1405,9 +1399,9 @@ class NumericTraits< std::complex< unsigned int > > static bool IsNonpositive(Self val) { return val.real() == 0; } static bool IsNegative(Self) { return false; } static bool IsNonnegative(Self) { return true; } - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = false; - static ITK_CONSTEXPR_VAR bool IsComplex = true; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = false; + static constexpr bool IsComplex = true; static Self ZeroValue() { return Zero; } static Self OneValue() { return One; } static unsigned int GetLength(const Self &) { return 2; } @@ -1468,9 +1462,9 @@ class NumericTraits< std::complex< long > > static bool IsNonpositive(Self val) { return val.real() <= 0; } static bool IsNegative(Self val) { return val.real() < 0; } static bool IsNonnegative(Self val) { return val.real() >= 0; } - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = false; - static ITK_CONSTEXPR_VAR bool IsComplex = true; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = false; + static constexpr bool IsComplex = true; static Self ZeroValue() { return Zero; } static Self OneValue() { return One; } static unsigned int GetLength(const Self &) { return 2; } @@ -1531,9 +1525,9 @@ class NumericTraits< std::complex< unsigned long > > static bool IsNonpositive(Self val) { return val.real() == 0; } static bool IsNegative(Self) { return false; } static bool IsNonnegative(Self) { return true; } - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = false; - static ITK_CONSTEXPR_VAR bool IsComplex = true; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = false; + static constexpr bool IsComplex = true; static Self ZeroValue() { return Zero; } static Self OneValue() { return One; } static unsigned int GetLength(const Self &) { return 2; } @@ -1594,9 +1588,9 @@ class NumericTraits< std::complex< float > > static bool IsNonpositive(Self val) { return val.real() <= 0.0; } static bool IsNegative(Self val) { return val.real() < 0.0; } static bool IsNonnegative(Self val) { return val.real() >= 0.0; } - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = false; - static ITK_CONSTEXPR_VAR bool IsComplex = true; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = false; + static constexpr bool IsComplex = true; static Self ZeroValue() { return Zero; } static Self OneValue() { return One; } static unsigned int GetLength(const Self &) { return 2; } @@ -1657,9 +1651,9 @@ class NumericTraits< std::complex< double > > static bool IsNonpositive(Self val) { return val.real() <= 0.0; } static bool IsNegative(Self val) { return val.real() < 0.0; } static bool IsNonnegative(Self val) { return val.real() >= 0.0; } - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = false; - static ITK_CONSTEXPR_VAR bool IsComplex = true; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = false; + static constexpr bool IsComplex = true; static Self ZeroValue() { return Zero; } static Self OneValue() { return One; } static unsigned int GetLength(const Self &) { return 2; } @@ -1720,9 +1714,9 @@ class NumericTraits< std::complex< long double > > static bool IsNonpositive(Self val) { return val.real() <= 0.0; } static bool IsNegative(Self val) { return val.real() < 0.0; } static bool IsNonnegative(Self val) { return val.real() >= 0.0; } - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = false; - static ITK_CONSTEXPR_VAR bool IsComplex = true; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = false; + static constexpr bool IsComplex = true; static Self ZeroValue() { return Zero; } static Self OneValue() { return One; } static unsigned int GetLength(const Self &) { return 2; } @@ -1750,7 +1744,6 @@ class NumericTraits< std::complex< long double > > } // end namespace itk -#undef itkNUMERIC_TRAITS_C11_ASSINMENT #include "itkFixedArray.h" #endif // itkNumericTraits_h diff --git a/Modules/Core/Common/include/itkNumericTraitsArrayPixel.h b/Modules/Core/Common/include/itkNumericTraitsArrayPixel.h index 7abc33d19ed..e16eb3a7278 100644 --- a/Modules/Core/Common/include/itkNumericTraitsArrayPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsArrayPixel.h @@ -109,9 +109,9 @@ class NumericTraits< Array< T > > return b; } - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = NumericTraits< ValueType >::IsInteger; - static ITK_CONSTEXPR_VAR bool IsComplex = NumericTraits< ValueType >::IsComplex; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = NumericTraits< ValueType >::IsInteger; + static constexpr bool IsComplex = NumericTraits< ValueType >::IsComplex; /** Set the length of the input array and fill it with zeros. */ static void SetLength(Array< T > & m, const unsigned int s) diff --git a/Modules/Core/Common/include/itkNumericTraitsCovariantVectorPixel.h b/Modules/Core/Common/include/itkNumericTraitsCovariantVectorPixel.h index fe9677210c5..354bca1574a 100644 --- a/Modules/Core/Common/include/itkNumericTraitsCovariantVectorPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsCovariantVectorPixel.h @@ -135,9 +135,9 @@ class NumericTraits< CovariantVector< T, D > > return OneValue(); } - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = NumericTraits< ValueType >::IsInteger; - static ITK_CONSTEXPR_VAR bool IsComplex = NumericTraits< ValueType >::IsComplex; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = NumericTraits< ValueType >::IsInteger; + static constexpr bool IsComplex = NumericTraits< ValueType >::IsComplex; /** Fixed length vectors cannot be resized, so an exception will * be thrown if the input size is not valid. If the size is valid diff --git a/Modules/Core/Common/include/itkNumericTraitsDiffusionTensor3DPixel.h b/Modules/Core/Common/include/itkNumericTraitsDiffusionTensor3DPixel.h index e8095949e93..4942b43f1c9 100644 --- a/Modules/Core/Common/include/itkNumericTraitsDiffusionTensor3DPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsDiffusionTensor3DPixel.h @@ -136,9 +136,9 @@ class NumericTraits< DiffusionTensor3D< T > > return Self( NumericTraits< T >::OneValue() ); } - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = NumericTraits< ValueType >::IsInteger; - static ITK_CONSTEXPR_VAR bool IsComplex = NumericTraits< ValueType >::IsComplex; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = NumericTraits< ValueType >::IsInteger; + static constexpr bool IsComplex = NumericTraits< ValueType >::IsComplex; /** Fixed length vectors cannot be resized, so an exception will * be thrown if the input size is not valid. In this case, the diff --git a/Modules/Core/Common/include/itkNumericTraitsFixedArrayPixel.h b/Modules/Core/Common/include/itkNumericTraitsFixedArrayPixel.h index 5fc9ab74e9b..5b2129fcf2f 100644 --- a/Modules/Core/Common/include/itkNumericTraitsFixedArrayPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsFixedArrayPixel.h @@ -181,14 +181,18 @@ class NumericTraits< FixedArray< T, D > > static const Self ITKCommon_EXPORT One; }; -// a macro to define and initialize static member variables +// a macro to define and initialize static member variables, +// NOTE: (T)(NumericTraits< T >::[Zero|One]) is needed to generate +// a temporary variable that is initialized from the +// constexpr [Zero|One] to be passed by const reference +// to the GENERIC_ARRAY constructor. #define itkStaticNumericTraitsGenericArrayMacro(GENERIC_ARRAY, T, D) \ template< > \ - ITKCommon_EXPORT const GENERIC_ARRAY< T, D > NumericTraits< GENERIC_ARRAY< T, D > >::Zero = GENERIC_ARRAY< T, D >( \ - NumericTraits< T >::Zero); \ + ITKCommon_EXPORT const GENERIC_ARRAY< T, D > NumericTraits< GENERIC_ARRAY< T, D > >::Zero = \ + GENERIC_ARRAY< T, D >( (T)(NumericTraits< T >::Zero) ); \ template< > \ - ITKCommon_EXPORT const GENERIC_ARRAY< T, D > NumericTraits< GENERIC_ARRAY< T, D > >::One = GENERIC_ARRAY< T, D >( \ - NumericTraits< T >::One); + ITKCommon_EXPORT const GENERIC_ARRAY< T, D > NumericTraits< GENERIC_ARRAY< T, D > >::One = \ + GENERIC_ARRAY< T, D >( (T)(NumericTraits< T >::One) ); // // List here the array dimension specializations of these static diff --git a/Modules/Core/Common/include/itkNumericTraitsPointPixel.h b/Modules/Core/Common/include/itkNumericTraitsPointPixel.h index 4a2ed0f3027..4925148ab4b 100644 --- a/Modules/Core/Common/include/itkNumericTraitsPointPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsPointPixel.h @@ -122,9 +122,9 @@ class NumericTraits< Point< T , D > > return OneValue(); } - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = NumericTraits< ValueType >::IsInteger; - static ITK_CONSTEXPR_VAR bool IsComplex = NumericTraits< ValueType >::IsComplex; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = NumericTraits< ValueType >::IsInteger; + static constexpr bool IsComplex = NumericTraits< ValueType >::IsComplex; /** Fixed length vectors cannot be resized, so an exception will * be thrown if the input size is not valid. If the size is valid diff --git a/Modules/Core/Common/include/itkNumericTraitsRGBAPixel.h b/Modules/Core/Common/include/itkNumericTraitsRGBAPixel.h index 8927fcd2c9f..a8f4570a20f 100644 --- a/Modules/Core/Common/include/itkNumericTraitsRGBAPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsRGBAPixel.h @@ -134,9 +134,9 @@ class NumericTraits< RGBAPixel< T > > return OneValue(); } - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = NumericTraits< ValueType >::IsInteger; - static ITK_CONSTEXPR_VAR bool IsComplex = NumericTraits< ValueType >::IsComplex; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = NumericTraits< ValueType >::IsInteger; + static constexpr bool IsComplex = NumericTraits< ValueType >::IsComplex; /** RGBA pixels must have 4 components, so the size cannot be * set to anything besides 4. If called with size of 4, this diff --git a/Modules/Core/Common/include/itkNumericTraitsRGBPixel.h b/Modules/Core/Common/include/itkNumericTraitsRGBPixel.h index dc9c318c46f..dc49bee20ed 100644 --- a/Modules/Core/Common/include/itkNumericTraitsRGBPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsRGBPixel.h @@ -134,9 +134,9 @@ class NumericTraits< RGBPixel< T > > return OneValue(); } - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = NumericTraits< ValueType >::IsInteger; - static ITK_CONSTEXPR_VAR bool IsComplex = NumericTraits< ValueType >::IsComplex; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = NumericTraits< ValueType >::IsInteger; + static constexpr bool IsComplex = NumericTraits< ValueType >::IsComplex; /** RGB pixels must have 3 components, so the size cannot be * set to anything besides 3. If called with size of 3, this diff --git a/Modules/Core/Common/include/itkNumericTraitsStdVector.h b/Modules/Core/Common/include/itkNumericTraitsStdVector.h index c0b31be797d..1a2f39c5d71 100644 --- a/Modules/Core/Common/include/itkNumericTraitsStdVector.h +++ b/Modules/Core/Common/include/itkNumericTraitsStdVector.h @@ -127,9 +127,9 @@ class NumericTraits< std::vector< T > > return b; } - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = NumericTraits< ValueType >::IsInteger; - static ITK_CONSTEXPR_VAR bool IsComplex = NumericTraits< ValueType >::IsComplex; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = NumericTraits< ValueType >::IsInteger; + static constexpr bool IsComplex = NumericTraits< ValueType >::IsComplex; /** Resize the input vector to the specified size */ static void SetLength(std::vector< T > & m, const unsigned int s) diff --git a/Modules/Core/Common/include/itkNumericTraitsTensorPixel.h b/Modules/Core/Common/include/itkNumericTraitsTensorPixel.h index f9822ec3f28..583e63a422a 100644 --- a/Modules/Core/Common/include/itkNumericTraitsTensorPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsTensorPixel.h @@ -135,9 +135,9 @@ class NumericTraits< SymmetricSecondRankTensor< T, D > > return OneValue(); } - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = NumericTraits< ValueType >::IsInteger; - static ITK_CONSTEXPR_VAR bool IsComplex = NumericTraits< ValueType >::IsComplex; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = NumericTraits< ValueType >::IsInteger; + static constexpr bool IsComplex = NumericTraits< ValueType >::IsComplex; /** Fixed length vectors cannot be resized, so an exception will * be thrown if the input size is not valid. Here, the size refers diff --git a/Modules/Core/Common/include/itkNumericTraitsVariableLengthVectorPixel.h b/Modules/Core/Common/include/itkNumericTraitsVariableLengthVectorPixel.h index 71a5c5da68c..26962482920 100644 --- a/Modules/Core/Common/include/itkNumericTraitsVariableLengthVectorPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsVariableLengthVectorPixel.h @@ -184,9 +184,9 @@ class NumericTraits< VariableLengthVector< T > > return flag; } - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = NumericTraits< ValueType >::IsInteger; - static ITK_CONSTEXPR_VAR bool IsComplex = NumericTraits< ValueType >::IsComplex; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = NumericTraits< ValueType >::IsInteger; + static constexpr bool IsComplex = NumericTraits< ValueType >::IsComplex; /** Resize the input vector to the specified size. */ diff --git a/Modules/Core/Common/include/itkNumericTraitsVectorPixel.h b/Modules/Core/Common/include/itkNumericTraitsVectorPixel.h index a8e69fb1f63..9526ee263eb 100644 --- a/Modules/Core/Common/include/itkNumericTraitsVectorPixel.h +++ b/Modules/Core/Common/include/itkNumericTraitsVectorPixel.h @@ -173,9 +173,9 @@ class NumericTraits< Vector< T, D > > return flag; } - static ITK_CONSTEXPR_VAR bool IsSigned = NumericTraits< ValueType >::IsSigned; - static ITK_CONSTEXPR_VAR bool IsInteger = NumericTraits< ValueType >::IsInteger; - static ITK_CONSTEXPR_VAR bool IsComplex = NumericTraits< ValueType >::IsComplex; + static constexpr bool IsSigned = NumericTraits< ValueType >::IsSigned; + static constexpr bool IsInteger = NumericTraits< ValueType >::IsInteger; + static constexpr bool IsComplex = NumericTraits< ValueType >::IsComplex; /** Fixed length vectors cannot be resized, so an exception will * be thrown if the input size is not valid. If the size is valid diff --git a/Modules/Core/Common/include/itkProgressReporter.h b/Modules/Core/Common/include/itkProgressReporter.h index 53d3bc9e74a..04a218096ea 100644 --- a/Modules/Core/Common/include/itkProgressReporter.h +++ b/Modules/Core/Common/include/itkProgressReporter.h @@ -107,7 +107,7 @@ class ITKCommon_EXPORT ProgressReporter float m_ProgressWeight; private: - ProgressReporter() ITK_DELETED_FUNCTION; + ProgressReporter() = delete; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkQuadrilateralCell.hxx b/Modules/Core/Common/include/itkQuadrilateralCell.hxx index 0836cf27f00..0b4d19646d6 100644 --- a/Modules/Core/Common/include/itkQuadrilateralCell.hxx +++ b/Modules/Core/Common/include/itkQuadrilateralCell.hxx @@ -293,9 +293,9 @@ QuadrilateralCell< TCellInterface > double *dist2, InterpolationWeightType *weight) { - static ITK_CONSTEXPR_VAR int ITK_QUAD_MAX_ITERATION = 10; - static ITK_CONSTEXPR_VAR double ITK_QUAD_CONVERGED = 1.e-03; - static ITK_CONSTEXPR_VAR double ITK_DIVERGED = 1.e6; + static constexpr int ITK_QUAD_MAX_ITERATION = 10; + static constexpr double ITK_QUAD_CONVERGED = 1.e-03; + static constexpr double ITK_DIVERGED = 1.e6; int iteration, converged; double params[CellDimension]; diff --git a/Modules/Core/Common/include/itkResourceProbe.h b/Modules/Core/Common/include/itkResourceProbe.h index 89a1cc8285a..566082e8dec 100644 --- a/Modules/Core/Common/include/itkResourceProbe.h +++ b/Modules/Core/Common/include/itkResourceProbe.h @@ -191,7 +191,7 @@ class ITK_TEMPLATE_EXPORT ResourceProbe size_t m_TotalPhysicalMemory; size_t m_AvailablePhysicalMemory; - static ITK_CONSTEXPR_VAR unsigned int tabwidth = 15; + static constexpr unsigned int tabwidth = 15; }; } // end namespace itk diff --git a/Modules/Core/Common/include/itkShapedNeighborhoodIterator.h b/Modules/Core/Common/include/itkShapedNeighborhoodIterator.h index 8247e3aa5a0..0afb7bcce3c 100644 --- a/Modules/Core/Common/include/itkShapedNeighborhoodIterator.h +++ b/Modules/Core/Common/include/itkShapedNeighborhoodIterator.h @@ -262,7 +262,7 @@ class ITK_TEMPLATE_EXPORT ShapedNeighborhoodIterator: protected: /** Copy constructor */ - ShapedNeighborhoodIterator(const ShapedNeighborhoodIterator & o) ITK_DELETED_FUNCTION; + ShapedNeighborhoodIterator(const ShapedNeighborhoodIterator & o) = delete; typedef typename Superclass::NeighborIndexType NeighborIndexType; diff --git a/Modules/Core/Common/src/itkIndent.cxx b/Modules/Core/Common/src/itkIndent.cxx index 60bb9fd8c24..eba820193d5 100644 --- a/Modules/Core/Common/src/itkIndent.cxx +++ b/Modules/Core/Common/src/itkIndent.cxx @@ -32,7 +32,7 @@ namespace itk { -static ITK_CONSTEXPR_VAR char blanks[ITK_NUMBER_OF_BLANKS + 1] = +static constexpr char blanks[ITK_NUMBER_OF_BLANKS + 1] = " "; /** diff --git a/Modules/Core/Common/src/itkNumericTraits.cxx b/Modules/Core/Common/src/itkNumericTraits.cxx index 1b2fe9b7133..f3e61478e70 100644 --- a/Modules/Core/Common/src/itkNumericTraits.cxx +++ b/Modules/Core/Common/src/itkNumericTraits.cxx @@ -26,69 +26,48 @@ namespace itk * definitions are defined. Other compilers (GCC) seem not to care, while * still others (Clang) require it. */ -#if !defined(_MSC_VER) || (ITK_COMPILER_CXX_CONSTEXPR) -ITK_CONSTEXPR_VAR bool NumericTraits< bool >:: Zero; -ITK_CONSTEXPR_VAR bool NumericTraits< bool >:: One; +constexpr bool NumericTraits< bool >:: Zero; +constexpr bool NumericTraits< bool >:: One; -ITK_CONSTEXPR_VAR unsigned char NumericTraits< unsigned char >:: Zero; -ITK_CONSTEXPR_VAR unsigned char NumericTraits< unsigned char >:: One; +constexpr unsigned char NumericTraits< unsigned char >:: Zero; +constexpr unsigned char NumericTraits< unsigned char >:: One; -ITK_CONSTEXPR_VAR signed char NumericTraits< signed char >:: Zero; -ITK_CONSTEXPR_VAR signed char NumericTraits< signed char >:: One; +constexpr signed char NumericTraits< signed char >:: Zero; +constexpr signed char NumericTraits< signed char >:: One; -ITK_CONSTEXPR_VAR char NumericTraits< char >:: Zero; -ITK_CONSTEXPR_VAR char NumericTraits< char >:: One; +constexpr char NumericTraits< char >:: Zero; +constexpr char NumericTraits< char >:: One; -ITK_CONSTEXPR_VAR unsigned short NumericTraits< unsigned short >:: Zero; -ITK_CONSTEXPR_VAR unsigned short NumericTraits< unsigned short >:: One; +constexpr unsigned short NumericTraits< unsigned short >:: Zero; +constexpr unsigned short NumericTraits< unsigned short >:: One; -ITK_CONSTEXPR_VAR short NumericTraits< short >:: Zero; -ITK_CONSTEXPR_VAR short NumericTraits< short >:: One; +constexpr short NumericTraits< short >:: Zero; +constexpr short NumericTraits< short >:: One; -ITK_CONSTEXPR_VAR unsigned int NumericTraits< unsigned int >:: Zero; -ITK_CONSTEXPR_VAR unsigned int NumericTraits< unsigned int >:: One; +constexpr unsigned int NumericTraits< unsigned int >:: Zero; +constexpr unsigned int NumericTraits< unsigned int >:: One; -ITK_CONSTEXPR_VAR int NumericTraits< int >:: Zero; -ITK_CONSTEXPR_VAR int NumericTraits< int >:: One; +constexpr int NumericTraits< int >:: Zero; +constexpr int NumericTraits< int >:: One; -ITK_CONSTEXPR_VAR unsigned long NumericTraits< unsigned long >:: Zero; -ITK_CONSTEXPR_VAR unsigned long NumericTraits< unsigned long >:: One; +constexpr unsigned long NumericTraits< unsigned long >:: Zero; +constexpr unsigned long NumericTraits< unsigned long >:: One; -ITK_CONSTEXPR_VAR long NumericTraits< long >:: Zero; -ITK_CONSTEXPR_VAR long NumericTraits< long >:: One; +constexpr long NumericTraits< long >:: Zero; +constexpr long NumericTraits< long >:: One; -ITK_CONSTEXPR_VAR long long NumericTraits< long long >:: Zero; -ITK_CONSTEXPR_VAR long long NumericTraits< long long >:: One; +constexpr long long NumericTraits< long long >:: Zero; +constexpr long long NumericTraits< long long >:: One; -ITK_CONSTEXPR_VAR unsigned long long NumericTraits< unsigned long long >:: Zero; -ITK_CONSTEXPR_VAR unsigned long long NumericTraits< unsigned long long >:: One; -#endif +constexpr unsigned long long NumericTraits< unsigned long long >:: Zero; +constexpr unsigned long long NumericTraits< unsigned long long >:: One; -// If not C++11, then use static initialization for real types -#if !(ITK_COMPILER_CXX_CONSTEXPR) +constexpr float NumericTraits< float >:: Zero; +constexpr float NumericTraits< float >:: One; -const float NumericTraits< float >:: Zero = 0.0F; -const float NumericTraits< float >:: One = 1.0F; +constexpr double NumericTraits< double >:: Zero; +constexpr double NumericTraits< double >:: One; -const double NumericTraits< double >:: Zero = 0.0; -const double NumericTraits< double >:: One = 1.0; - -const long double NumericTraits< long double >:: Zero = 0.0; -const long double NumericTraits< long double >:: One = 1.0; - -#else - -ITK_CONSTEXPR_VAR float NumericTraits< float >:: Zero; -ITK_CONSTEXPR_VAR float NumericTraits< float >:: One; - -ITK_CONSTEXPR_VAR double NumericTraits< double >:: Zero; -ITK_CONSTEXPR_VAR double NumericTraits< double >:: One; - -ITK_CONSTEXPR_VAR long double NumericTraits< long double >:: Zero; -ITK_CONSTEXPR_VAR long double NumericTraits< long double >:: One; - - -#endif const std::complex< char > NumericTraits< std::complex< char > >:: Zero = std::complex< char >(0, 0); const std::complex< char > NumericTraits< std::complex< char > >:: One = std::complex< char >(1, 0); diff --git a/Modules/Core/Common/test/itkNumericTraitsTest.cxx b/Modules/Core/Common/test/itkNumericTraitsTest.cxx index d41bd805a64..ce408a53a49 100644 --- a/Modules/Core/Common/test/itkNumericTraitsTest.cxx +++ b/Modules/Core/Common/test/itkNumericTraitsTest.cxx @@ -60,8 +60,8 @@ class NumericTraits< ForcedFailureTestCase > : public std::numeric_limits< Force { public: typedef ForcedFailureTestCase ValueType; - static ITK_CONSTEXPR_VAR bool IsSigned = true; //the default (for unknown classes) in std::numeric_limits is false, false. - static ITK_CONSTEXPR_VAR bool IsInteger = true; //so this should not match and the test should fail. + static constexpr bool IsSigned = true; //the default (for unknown classes) in std::numeric_limits is false, false. + static constexpr bool IsInteger = true; //so this should not match and the test should fail. }; template<> @@ -69,8 +69,8 @@ class NumericTraits< std::complex< ForcedFailureTestCase > > { public: typedef ForcedFailureTestCase ValueType; - static ITK_CONSTEXPR_VAR bool IsSigned = false; //Complex values are never integers, and their IsSigned property - static ITK_CONSTEXPR_VAR bool IsInteger = true; //should match that of their base type, so this should fail + static constexpr bool IsSigned = false; //Complex values are never integers, and their IsSigned property + static constexpr bool IsInteger = true; //should match that of their base type, so this should fail }; }//end namespace itk @@ -126,8 +126,8 @@ template void CheckFixedArrayTraits(const T &t) // check std::numeric_limits members std::cout << "itk::NumericTraits<" << name << ">" << std::endl; - std::cout << "\tZero: " << static_cast::PrintType>(itk::NumericTraits::Zero) << std::endl; - std::cout << "\tOne: " << static_cast::PrintType>(itk::NumericTraits::One) << std::endl; + std::cout << "\tZero: " << static_cast::PrintType>((T)(itk::NumericTraits::Zero)) << std::endl; + std::cout << "\tOne: " << static_cast::PrintType>((T)(itk::NumericTraits::One)) << std::endl; std::cout << "\tmin(): " << static_cast::PrintType>(itk::NumericTraits::min()) << std::endl; std::cout << "\tNonpositiveMin(): " << static_cast::PrintType>(itk::NumericTraits::NonpositiveMin()) << std::endl; std::cout << "\tmax(): " << static_cast::PrintType>(itk::NumericTraits::max()) << std::endl; diff --git a/Modules/Core/GPUCommon/include/itkGPUImageDataManager.h b/Modules/Core/GPUCommon/include/itkGPUImageDataManager.h index 1a9caa9a0e6..1527e8625c1 100644 --- a/Modules/Core/GPUCommon/include/itkGPUImageDataManager.h +++ b/Modules/Core/GPUCommon/include/itkGPUImageDataManager.h @@ -56,7 +56,7 @@ class ITK_TEMPLATE_EXPORT GPUImageDataManager : public GPUDataManager itkNewMacro(Self); itkTypeMacro(GPUImageDataManager, GPUDataManager); - static ITK_CONSTEXPR_VAR unsigned int ImageDimension = ImageType::ImageDimension; + static constexpr unsigned int ImageDimension = ImageType::ImageDimension; itkGetModifiableObjectMacro(GPUBufferedRegionIndex, GPUDataManager); itkGetModifiableObjectMacro(GPUBufferedRegionSize, GPUDataManager); diff --git a/Modules/Core/Mesh/test/itkParametricSpaceToImageSpaceMeshFilterTest.cxx b/Modules/Core/Mesh/test/itkParametricSpaceToImageSpaceMeshFilterTest.cxx index 7d526cdab6b..e4808a7bc3f 100644 --- a/Modules/Core/Mesh/test/itkParametricSpaceToImageSpaceMeshFilterTest.cxx +++ b/Modules/Core/Mesh/test/itkParametricSpaceToImageSpaceMeshFilterTest.cxx @@ -29,7 +29,7 @@ struct helper template< unsigned int VDimension > struct helper< itk::Index< VDimension > > { - static ITK_CONSTEXPR_VAR unsigned int Dimension = VDimension; + static constexpr unsigned int Dimension = VDimension; typedef itk::Index< VDimension > PositionType; template< class TImage, class TIterator > @@ -42,7 +42,7 @@ struct helper< itk::Index< VDimension > > template< typename TCoord, unsigned int VDimension > struct helper< itk::Point< TCoord, VDimension > > { - static ITK_CONSTEXPR_VAR unsigned int Dimension = VDimension; + static constexpr unsigned int Dimension = VDimension; typedef itk::Point< TCoord, VDimension > PositionType; template< class TImage, class TIterator > diff --git a/Modules/Filtering/FFT/include/itkFFTWCommon.h b/Modules/Filtering/FFT/include/itkFFTWCommon.h index 42b229b0735..39377ab07cb 100644 --- a/Modules/Filtering/FFT/include/itkFFTWCommon.h +++ b/Modules/Filtering/FFT/include/itkFFTWCommon.h @@ -69,7 +69,7 @@ class Proxy< float > typedef Proxy Self; // FFTW works with any data size, but is optimized for size decomposition with prime factors up to 13. - static ITK_CONSTEXPR_VAR SizeValueType GREATEST_PRIME_FACTOR = 13; + static constexpr SizeValueType GREATEST_PRIME_FACTOR = 13; static PlanType Plan_dft_c2r_1d(int n, ComplexType *in, @@ -373,7 +373,7 @@ class Proxy< double > typedef Proxy Self; // FFTW works with any data size, but is optimized for size decomposition with prime factors up to 13. - static ITK_CONSTEXPR_VAR SizeValueType GREATEST_PRIME_FACTOR = 13; + static constexpr SizeValueType GREATEST_PRIME_FACTOR = 13; static PlanType Plan_dft_c2r_1d(int n, ComplexType *in, diff --git a/Modules/Filtering/FFT/include/itkVnlFFTCommon.h b/Modules/Filtering/FFT/include/itkVnlFFTCommon.h index 605c10de25d..ed7bab8c2f4 100644 --- a/Modules/Filtering/FFT/include/itkVnlFFTCommon.h +++ b/Modules/Filtering/FFT/include/itkVnlFFTCommon.h @@ -38,7 +38,7 @@ struct VnlFFTCommon template< typename TSizeValue > static bool IsDimensionSizeLegal(TSizeValue n); - static ITK_CONSTEXPR_VAR SizeValueType GREATEST_PRIME_FACTOR = 5; + static constexpr SizeValueType GREATEST_PRIME_FACTOR = 5; /** Convenience struct for computing the discrete Fourier Transform. */ diff --git a/Modules/Filtering/ImageIntensity/test/itkNaryMaximumImageFilterTest.cxx b/Modules/Filtering/ImageIntensity/test/itkNaryMaximumImageFilterTest.cxx index 6d489b420a2..f2266dadf3a 100644 --- a/Modules/Filtering/ImageIntensity/test/itkNaryMaximumImageFilterTest.cxx +++ b/Modules/Filtering/ImageIntensity/test/itkNaryMaximumImageFilterTest.cxx @@ -117,8 +117,8 @@ int itkNaryMaximumImageFilterTest( int, char* [] ) InputImageType::Pointer inputImageA = InputImageType::New(); InputImageType::Pointer inputImageB = InputImageType::New(); - static ITK_CONSTEXPR_VAR int minValue = 12; - static ITK_CONSTEXPR_VAR int maxValue = 13; + static constexpr int minValue = 12; + static constexpr int maxValue = 13; InitializeImage( inputImageA, minValue ); InitializeImage( inputImageB, maxValue ); diff --git a/Modules/Filtering/ImageStatistics/test/itkAccumulateImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkAccumulateImageFilterTest.cxx index 130cac09de3..90ea1b2306f 100644 --- a/Modules/Filtering/ImageStatistics/test/itkAccumulateImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkAccumulateImageFilterTest.cxx @@ -25,7 +25,7 @@ int itkAccumulateImageFilterTest(int argc, char *argv[] ) { typedef short PixelType; - static ITK_CONSTEXPR_VAR int ImageDimension = 3; + static constexpr int ImageDimension = 3; typedef itk::Image InputImageType; typedef itk::Image OutputImageType; diff --git a/Modules/Filtering/ImageStatistics/test/itkAdaptiveHistogramEqualizationImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkAdaptiveHistogramEqualizationImageFilterTest.cxx index be14f45f297..820729d104a 100644 --- a/Modules/Filtering/ImageStatistics/test/itkAdaptiveHistogramEqualizationImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkAdaptiveHistogramEqualizationImageFilterTest.cxx @@ -35,7 +35,7 @@ int itkAdaptiveHistogramEqualizationImageFilterTest( int argc, char * argv[] ) typedef float InputPixelType; - static ITK_CONSTEXPR_VAR int ImageDimension = 2; + static constexpr int ImageDimension = 2; typedef itk::Image< InputPixelType, ImageDimension > InputImageType; typedef itk::ImageFileReader< InputImageType > ReaderType; diff --git a/Modules/Filtering/ImageStatistics/test/itkGetAverageSliceImageFilterTest.cxx b/Modules/Filtering/ImageStatistics/test/itkGetAverageSliceImageFilterTest.cxx index d94c9bcc4fe..c33ebc52e9a 100644 --- a/Modules/Filtering/ImageStatistics/test/itkGetAverageSliceImageFilterTest.cxx +++ b/Modules/Filtering/ImageStatistics/test/itkGetAverageSliceImageFilterTest.cxx @@ -25,7 +25,7 @@ int itkGetAverageSliceImageFilterTest(int argc, char *argv[] ) { typedef short PixelType; - static ITK_CONSTEXPR_VAR int ImageDimension = 3; + static constexpr int ImageDimension = 3; typedef itk::Image InputImageType; typedef itk::Image OutputImageType; diff --git a/Modules/Filtering/Thresholding/test/itkOtsuThresholdCalculatorVersusOtsuMultipleThresholdsCalculatorTest.cxx b/Modules/Filtering/Thresholding/test/itkOtsuThresholdCalculatorVersusOtsuMultipleThresholdsCalculatorTest.cxx index 32af3db4bff..a1375af103d 100644 --- a/Modules/Filtering/Thresholding/test/itkOtsuThresholdCalculatorVersusOtsuMultipleThresholdsCalculatorTest.cxx +++ b/Modules/Filtering/Thresholding/test/itkOtsuThresholdCalculatorVersusOtsuMultipleThresholdsCalculatorTest.cxx @@ -65,7 +65,7 @@ int itkOtsuThresholdCalculatorVersusOtsuMultipleThresholdsCalculatorTest(int arg otsuMultipleCalculator->SetInputHistogram( histogramGenerator->GetOutput() ); otsuMultipleCalculator->SetNumberOfThresholds(numberOfThresholds); - static ITK_CONSTEXPR_VAR int binsArray[] = {4,8,16,32,64,128,256,512,1024}; + static constexpr int binsArray[] = {4,8,16,32,64,128,256,512,1024}; std::vector binsVector (binsArray, binsArray + sizeof(binsArray) / sizeof(binsArray[0]) ); for( std::vector::iterator binsIterator = binsVector.begin(); binsIterator != binsVector.end(); binsIterator++ ) { diff --git a/Modules/IO/GE/src/itkGE5ImageIO.cxx b/Modules/IO/GE/src/itkGE5ImageIO.cxx index d8c59081364..5586d90aada 100644 --- a/Modules/IO/GE/src/itkGE5ImageIO.cxx +++ b/Modules/IO/GE/src/itkGE5ImageIO.cxx @@ -30,7 +30,7 @@ namespace itk { -static ITK_CONSTEXPR_VAR char GE_PROD_STR[] = "SIGNA"; +static constexpr char GE_PROD_STR[] = "SIGNA"; // Default constructor GE5ImageIO::GE5ImageIO() {} diff --git a/Modules/IO/ImageBase/include/itkImageIOBase.h b/Modules/IO/ImageBase/include/itkImageIOBase.h index 6b760bccaff..4553dea50a8 100644 --- a/Modules/IO/ImageBase/include/itkImageIOBase.h +++ b/Modules/IO/ImageBase/include/itkImageIOBase.h @@ -445,7 +445,7 @@ class ITKIOImageBase_EXPORT ImageIOBase:public LightProcessObject template struct MapPixelType { - static ITK_CONSTEXPR_VAR IOComponentType CType = + static constexpr IOComponentType CType = UNKNOWNCOMPONENTTYPE; }; template @@ -710,7 +710,7 @@ class ITKIOImageBase_EXPORT ImageIOBase:public LightProcessObject #define IMAGEIOBASE_TYPEMAP(type,ctype) \ template <> struct ImageIOBase::MapPixelType \ { \ - static ITK_CONSTEXPR_VAR IOComponentType CType = ctype; \ + static constexpr IOComponentType CType = ctype; \ } // the following typemaps are not platform independent diff --git a/Modules/IO/ImageBase/include/itkfdstream/fdstream.hpp b/Modules/IO/ImageBase/include/itkfdstream/fdstream.hpp index 831393ba0fe..19675a9c907 100644 --- a/Modules/IO/ImageBase/include/itkfdstream/fdstream.hpp +++ b/Modules/IO/ImageBase/include/itkfdstream/fdstream.hpp @@ -108,8 +108,8 @@ class fdinbuf : public std::streambuf { * - at most, pbSize characters in putback area plus * - at most, bufSize characters in ordinary read buffer */ - static ITK_CONSTEXPR_VAR ptrdiff_t pbSize = 4; // size of putback area - static ITK_CONSTEXPR_VAR ptrdiff_t bufSize = 1024; // size of the data buffer + static constexpr ptrdiff_t pbSize = 4; // size of putback area + static constexpr ptrdiff_t bufSize = 1024; // size of the data buffer char buffer[bufSize+pbSize]; // data buffer public: diff --git a/Modules/IO/LSM/src/itkLSMImageIO.cxx b/Modules/IO/LSM/src/itkLSMImageIO.cxx index ba91d81f73b..08381be675f 100644 --- a/Modules/IO/LSM/src/itkLSMImageIO.cxx +++ b/Modules/IO/LSM/src/itkLSMImageIO.cxx @@ -42,7 +42,7 @@ extern "C" { static void TagExtender(TIFF *tiff) { - static ITK_CONSTEXPR_VAR TIFFFieldInfo xtiffFieldInfo[] = { + static constexpr TIFFFieldInfo xtiffFieldInfo[] = { { TIF_CZ_LSMINFO, TIFF_VARIABLE, TIFF_VARIABLE, TIFF_BYTE, FIELD_CUSTOM, 0, 1, const_cast< char * >( "LSM Private Tag" ) } }; diff --git a/Modules/IO/Mesh/include/itkMeshIOBase.h b/Modules/IO/Mesh/include/itkMeshIOBase.h index 082a278e647..05ac625bd10 100644 --- a/Modules/IO/Mesh/include/itkMeshIOBase.h +++ b/Modules/IO/Mesh/include/itkMeshIOBase.h @@ -148,7 +148,7 @@ class ITKIOMesh_EXPORT MeshIOBase:public LightProcessObject template< typename T > struct MapComponentType { - static ITK_CONSTEXPR_VAR IOComponentType CType = UNKNOWNCOMPONENTTYPE; + static constexpr IOComponentType CType = UNKNOWNCOMPONENTTYPE; }; template< typename T > @@ -760,7 +760,7 @@ class ITKIOMesh_EXPORT MeshIOBase:public LightProcessObject template< > \ struct MeshIOBase:: MapComponentType< type > \ { \ - static ITK_CONSTEXPR_VAR IOComponentType CType = ctype; \ + static constexpr IOComponentType CType = ctype; \ } MESHIOBASE_TYPEMAP(unsigned char, UCHAR); diff --git a/Modules/IO/TransformMINC/test/itkIOTransformMINCTest.cxx b/Modules/IO/TransformMINC/test/itkIOTransformMINCTest.cxx index c743d292302..946b2cb8db3 100644 --- a/Modules/IO/TransformMINC/test/itkIOTransformMINCTest.cxx +++ b/Modules/IO/TransformMINC/test/itkIOTransformMINCTest.cxx @@ -29,7 +29,7 @@ #include "itkMath.h" -static ITK_CONSTEXPR_VAR int point_counter=1000; +static constexpr int point_counter=1000; templatevoid RandomPix(vnl_random &randgen,itk::Vector &pix, diff --git a/Modules/IO/TransformMINC/test/itkMINCTransformAdapterTest.cxx b/Modules/IO/TransformMINC/test/itkMINCTransformAdapterTest.cxx index bf3e8eac99e..8bb6e1a12cd 100644 --- a/Modules/IO/TransformMINC/test/itkMINCTransformAdapterTest.cxx +++ b/Modules/IO/TransformMINC/test/itkMINCTransformAdapterTest.cxx @@ -30,8 +30,8 @@ #include "itkMath.h" -static ITK_CONSTEXPR_VAR double tolerance = 1e-5; -static ITK_CONSTEXPR_VAR int point_counter=1000; +static constexpr double tolerance = 1e-5; +static constexpr int point_counter=1000; templatevoid RandomPix(vnl_random &randgen,itk::Vector &pix, diff --git a/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.hxx b/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.hxx index b32055cdeb4..6b7cddcbf28 100644 --- a/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.hxx +++ b/Modules/Nonunit/Review/include/itkLabelGeometryImageFilter.hxx @@ -89,7 +89,7 @@ CalculateOrientedImage( bool useLabelImage, const TInputImage *inputImage) { - static ITK_CONSTEXPR_VAR unsigned int Dimension = TInputImage::ImageDimension; + static constexpr unsigned int Dimension = TInputImage::ImageDimension; // CalculateOrientedBoundingBoxVertices needs to have already been // called. This is taken care of by the flags. diff --git a/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapperItpack.h b/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapperItpack.h index 7a9f4d2cd0a..f4b933b22c9 100644 --- a/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapperItpack.h +++ b/Modules/Numerics/FEM/include/itkFEMLinearSystemWrapperItpack.h @@ -64,22 +64,12 @@ class ITKFEM_EXPORT LinearSystemWrapperItpack : public LinearSystemWrapper /** vector of matrices typedef */ typedef std::vector MatrixHolder; - /* auto pointer to vector of matrices typedef */ - /* typedef std::auto_ptr MatrixArrayPtr; */ - /** vector representation typedef */ - /* typedef std::auto_ptr VectorRepresentation; */ typedef double *VectorRepresentation; /** vector of vector typedef */ typedef std::vector VectorHolder; - /* auto pointer to vector of vectors typedef */ - /* typedef std::auto_ptr VectorArrayPtr; */ - - /* pointer to array of unsigned int typedef */ - /* typedef std::auto_ptr UnsignedIntegerArrayPtr; */ - /* ----------------------------------------------------------------- * * Routines for setting/reporting itpack parameters diff --git a/Modules/Numerics/FEM/include/itkFEMRobustSolver.h b/Modules/Numerics/FEM/include/itkFEMRobustSolver.h index 167cd063325..ac0b1c7fc9c 100644 --- a/Modules/Numerics/FEM/include/itkFEMRobustSolver.h +++ b/Modules/Numerics/FEM/include/itkFEMRobustSolver.h @@ -350,8 +350,7 @@ class ITK_TEMPLATE_EXPORT RobustSolver : public Solver * * \ingroup ITKFEM */ -class CompareLandmarkDisplacementError : - public std::binary_function +class CompareLandmarkDisplacementError { public: bool operator()(const Load::Pointer & L1 , const Load::Pointer & L2) diff --git a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.h b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.h index e5c43079132..38f1c275515 100644 --- a/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.h +++ b/Modules/Numerics/Optimizersv4/include/itkRegistrationParameterScalesEstimator.h @@ -258,7 +258,7 @@ class ITK_TEMPLATE_EXPORT RegistrationParameterScalesEstimator typename VirtualPointSetType::ConstPointer m_VirtualDomainPointSet; // the threadhold to decide if the number of random samples uses logarithm - static ITK_CONSTEXPR_VAR SizeValueType SizeOfSmallDomain = 1000; + static constexpr SizeValueType SizeOfSmallDomain = 1000; private: ITK_DISALLOW_COPY_AND_ASSIGN(RegistrationParameterScalesEstimator); diff --git a/Modules/Numerics/Statistics/include/itkHistogram.h b/Modules/Numerics/Statistics/include/itkHistogram.h index 0bcc78c6fc3..c9a565e01e1 100644 --- a/Modules/Numerics/Statistics/include/itkHistogram.h +++ b/Modules/Numerics/Statistics/include/itkHistogram.h @@ -393,7 +393,7 @@ class ITK_TEMPLATE_EXPORT Histogram: // Pointer of DenseFrequencyContainer const Self *m_Histogram; private: - ConstIterator() ITK_DELETED_FUNCTION; + ConstIterator() = delete; }; // end of iterator class /** \class Iterator @@ -430,11 +430,11 @@ class ITK_TEMPLATE_EXPORT Histogram: private: // To ensure const-correctness these method must not be in the public API. // The are not implemented, since they should never be called. - Iterator() ITK_DELETED_FUNCTION; - Iterator(const Self *histogram) ITK_DELETED_FUNCTION; - Iterator(InstanceIdentifier id, const Self *histogram) ITK_DELETED_FUNCTION; - Iterator(const ConstIterator & it) ITK_DELETED_FUNCTION; - ConstIterator & operator=(const ConstIterator & it) ITK_DELETED_FUNCTION; + Iterator() = delete; + Iterator(const Self *histogram) = delete; + Iterator(InstanceIdentifier id, const Self *histogram) = delete; + Iterator(const ConstIterator & it) = delete; + ConstIterator & operator=(const ConstIterator & it) = delete; }; // end of iterator class Iterator Begin() diff --git a/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.h b/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.h index b78704a8595..e8839ccafb7 100644 --- a/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.h +++ b/Modules/Numerics/Statistics/include/itkImageToListSampleAdaptor.h @@ -200,7 +200,7 @@ class ITK_TEMPLATE_EXPORT ImageToListSampleAdaptor: {} private: - ConstIterator() ITK_DELETED_FUNCTION; + ConstIterator() = delete; ImageConstIteratorType m_Iter; mutable MeasurementVectorType m_MeasurementVectorCache; InstanceIdentifier m_InstanceIdentifier; @@ -239,11 +239,11 @@ class ITK_TEMPLATE_EXPORT ImageToListSampleAdaptor: private: // To ensure const-correctness these method must not be in the public API. // The are purposly not implemented, since they should never be called. - Iterator() ITK_DELETED_FUNCTION; - Iterator(const Self *adaptor) ITK_DELETED_FUNCTION; - Iterator(const ImageConstIteratorType & iter, InstanceIdentifier iid) ITK_DELETED_FUNCTION; - Iterator(const ConstIterator & it) ITK_DELETED_FUNCTION; - ConstIterator & operator=(const ConstIterator & it) ITK_DELETED_FUNCTION; + Iterator() = delete; + Iterator(const Self *adaptor) = delete; + Iterator(const ImageConstIteratorType & iter, InstanceIdentifier iid) = delete; + Iterator(const ConstIterator & it) = delete; + ConstIterator & operator=(const ConstIterator & it) = delete; }; /** returns an iterator that points to the beginning of the container */ diff --git a/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.h b/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.h index 5158ae13f90..1503da3d169 100644 --- a/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.h +++ b/Modules/Numerics/Statistics/include/itkImageToNeighborhoodSampleAdaptor.h @@ -211,7 +211,7 @@ class ITK_TEMPLATE_EXPORT ImageToNeighborhoodSampleAdaptor : } private: - ConstIterator() ITK_DELETED_FUNCTION; + ConstIterator() = delete; mutable MeasurementVectorType m_MeasurementVectorCache; InstanceIdentifier m_InstanceIdentifier; }; @@ -252,10 +252,10 @@ class ITK_TEMPLATE_EXPORT ImageToNeighborhoodSampleAdaptor : private: // To ensure const-correctness these method must not be in the public API. // The are not implemented, since they should never be called. - Iterator() ITK_DELETED_FUNCTION; - Iterator(const Self * adaptor) ITK_DELETED_FUNCTION; - Iterator(const ConstIterator & it) ITK_DELETED_FUNCTION; - ConstIterator& operator=(const ConstIterator& it) ITK_DELETED_FUNCTION; + Iterator() = delete; + Iterator(const Self * adaptor) = delete; + Iterator(const ConstIterator & it) = delete; + ConstIterator& operator=(const ConstIterator& it) = delete; }; /** returns an iterator that points to the beginning of the container */ diff --git a/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.h b/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.h index 8422b3dc9a6..49cf36abe0c 100644 --- a/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.h +++ b/Modules/Numerics/Statistics/include/itkJointDomainImageToListSampleAdaptor.h @@ -250,7 +250,7 @@ class ITK_TEMPLATE_EXPORT JointDomainImageToListSampleAdaptor: } private: - ConstIterator() ITK_DELETED_FUNCTION; + ConstIterator() = delete; mutable MeasurementVectorType m_MeasurementVectorCache; InstanceIdentifier m_InstanceIdentifier; const JointDomainImageToListSampleAdaptor *m_Adaptor; @@ -287,10 +287,10 @@ class ITK_TEMPLATE_EXPORT JointDomainImageToListSampleAdaptor: private: // To ensure const-correctness these method must not be in the public API. // The are purposly not implemented, since they should never be called. - Iterator() ITK_DELETED_FUNCTION; - Iterator(const Self *adaptor) ITK_DELETED_FUNCTION; - Iterator(const ConstIterator & it) ITK_DELETED_FUNCTION; - ConstIterator & operator=(const ConstIterator & it) ITK_DELETED_FUNCTION; + Iterator() = delete; + Iterator(const Self *adaptor) = delete; + Iterator(const ConstIterator & it) = delete; + ConstIterator & operator=(const ConstIterator & it) = delete; }; diff --git a/Modules/Numerics/Statistics/include/itkKdTree.h b/Modules/Numerics/Statistics/include/itkKdTree.h index 0e26bcbafda..3a5d7443baa 100644 --- a/Modules/Numerics/Statistics/include/itkKdTree.h +++ b/Modules/Numerics/Statistics/include/itkKdTree.h @@ -589,7 +589,7 @@ class ITK_TEMPLATE_EXPORT KdTree:public Object } private: - NearestNeighbors() ITK_DELETED_FUNCTION; + NearestNeighbors() = delete; /** The index of the farthest neighbor among k-neighbors */ unsigned int m_FarthestNeighborIndex; diff --git a/Modules/Numerics/Statistics/include/itkListSample.h b/Modules/Numerics/Statistics/include/itkListSample.h index 7defe5f662b..51222c4dedb 100644 --- a/Modules/Numerics/Statistics/include/itkListSample.h +++ b/Modules/Numerics/Statistics/include/itkListSample.h @@ -191,7 +191,7 @@ class ITK_TEMPLATE_EXPORT ListSample:public Sample< TMeasurementVector > } private: - ConstIterator() ITK_DELETED_FUNCTION; + ConstIterator() = delete; typedef typename InternalDataContainerType::const_iterator InternalIterator; InternalIterator m_Iter; InstanceIdentifier m_InstanceIdentifier; @@ -229,11 +229,11 @@ class ITK_TEMPLATE_EXPORT ListSample:public Sample< TMeasurementVector > private: // To ensure const-correctness these method must not be in the public API. // The are purposly not implemented, since they should never be called. - Iterator() ITK_DELETED_FUNCTION; - Iterator(const Self *sample) ITK_DELETED_FUNCTION; - Iterator(typename InternalDataContainerType::const_iterator iter, InstanceIdentifier iid) ITK_DELETED_FUNCTION; - Iterator(const ConstIterator & it) ITK_DELETED_FUNCTION; - ConstIterator & operator=(const ConstIterator & it) ITK_DELETED_FUNCTION; + Iterator() = delete; + Iterator(const Self *sample) = delete; + Iterator(typename InternalDataContainerType::const_iterator iter, InstanceIdentifier iid) = delete; + Iterator(const ConstIterator & it) = delete; + ConstIterator & operator=(const ConstIterator & it) = delete; }; /** returns an iterator that points to the beginning of the container */ diff --git a/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.h b/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.h index fe464339ed6..e2465fad6cf 100644 --- a/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.h +++ b/Modules/Numerics/Statistics/include/itkPointSetToListSampleAdaptor.h @@ -170,7 +170,7 @@ class ITK_TEMPLATE_EXPORT PointSetToListSampleAdaptor: } private: - ConstIterator() ITK_DELETED_FUNCTION; + ConstIterator() = delete; PointsContainerConstIteratorType m_Iter; InstanceIdentifier m_InstanceIdentifier; }; @@ -205,11 +205,11 @@ class ITK_TEMPLATE_EXPORT PointSetToListSampleAdaptor: private: // To ensure const-correctness these method must not be in the public API. // The are not implemented, since they should never be called. - Iterator() ITK_DELETED_FUNCTION; - Iterator(const Self *adaptor) ITK_DELETED_FUNCTION; - Iterator(PointsContainerConstIteratorType iter, InstanceIdentifier iid) ITK_DELETED_FUNCTION; - Iterator(const ConstIterator & it) ITK_DELETED_FUNCTION; - ConstIterator & operator=(const ConstIterator & it) ITK_DELETED_FUNCTION; + Iterator() = delete; + Iterator(const Self *adaptor) = delete; + Iterator(PointsContainerConstIteratorType iter, InstanceIdentifier iid) = delete; + Iterator(const ConstIterator & it) = delete; + ConstIterator & operator=(const ConstIterator & it) = delete; }; diff --git a/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.h b/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.h index 230381e8b6d..e541007c2fb 100644 --- a/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.h +++ b/Modules/Numerics/Statistics/include/itkVectorContainerToListSampleAdaptor.h @@ -166,7 +166,7 @@ class ITK_TEMPLATE_EXPORT VectorContainerToListSampleAdaptor: } private: - ConstIterator() ITK_DELETED_FUNCTION; + ConstIterator() = delete; VectorContainerConstIterator m_Iter; InstanceIdentifier m_InstanceIdentifier; }; @@ -199,11 +199,11 @@ class ITK_TEMPLATE_EXPORT VectorContainerToListSampleAdaptor: private: // To ensure const-correctness these method must not be in the public API. // The are not implemented, since they should never be called. - Iterator() ITK_DELETED_FUNCTION; - Iterator( const Self *adaptor ) ITK_DELETED_FUNCTION; - Iterator( VectorContainerConstIterator iter, InstanceIdentifier iid ) ITK_DELETED_FUNCTION; - Iterator( const ConstIterator & it) ITK_DELETED_FUNCTION; - ConstIterator & operator=( const ConstIterator & it ) ITK_DELETED_FUNCTION; + Iterator() = delete; + Iterator( const Self *adaptor ) = delete; + Iterator( VectorContainerConstIterator iter, InstanceIdentifier iid ) = delete; + Iterator( const ConstIterator & it) = delete; + ConstIterator & operator=( const ConstIterator & it ) = delete; }; /** returns an iterator that points to the beginning of the container */ diff --git a/Modules/Registration/Common/test/itkBlockMatchingImageFilterTest.cxx b/Modules/Registration/Common/test/itkBlockMatchingImageFilterTest.cxx index bb2bfaabf10..497dbadec8f 100644 --- a/Modules/Registration/Common/test/itkBlockMatchingImageFilterTest.cxx +++ b/Modules/Registration/Common/test/itkBlockMatchingImageFilterTest.cxx @@ -48,7 +48,7 @@ int itkBlockMatchingImageFilterTest( int argc, char * argv[] ) typedef unsigned char InputPixelType; typedef itk::RGBPixel OutputPixelType; - static ITK_CONSTEXPR_VAR unsigned int Dimension = 3; + static constexpr unsigned int Dimension = 3; typedef itk::Image< InputPixelType, Dimension > InputImageType; typedef itk::Image< OutputPixelType, Dimension > OutputImageType; diff --git a/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx b/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx index ec90362040f..561653059e6 100644 --- a/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx +++ b/Modules/Registration/Metricsv4/include/itkMattesMutualInformationImageToImageMetricv4.hxx @@ -260,7 +260,7 @@ MattesMutualInformationImageToImageMetricv4m_MovingImageBinSize * this->GetNumberOfValidPoints() ); - static ITK_CONSTEXPR_VAR PDFValueType closeToZero = std::numeric_limits::epsilon(); + static constexpr PDFValueType closeToZero = std::numeric_limits::epsilon(); for( unsigned int fixedIndex = 0; fixedIndex < this->m_NumberOfHistogramBins; ++fixedIndex ) { const PDFValueType fixedImagePDFValue = this->m_ThreaderFixedImageMarginalPDF[0][fixedIndex]; diff --git a/Modules/Remote/AnalyzeObjectMapIO.remote.cmake b/Modules/Remote/AnalyzeObjectMapIO.remote.cmake index 181138d5b44..b1ac9cc93fd 100644 --- a/Modules/Remote/AnalyzeObjectMapIO.remote.cmake +++ b/Modules/Remote/AnalyzeObjectMapIO.remote.cmake @@ -1,5 +1,5 @@ itk_fetch_module(AnalyzeObjectMapIO "AnalyzeObjectMapIO plugin for ITK. From Insight Journal article with handle: https://hdl.handle.net/1926/593" GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/itkAnalyzeObjectMap.git - GIT_TAG aa582d9f7b98bad456201c16d3ba34e8e4f7f25b + GIT_TAG 5c3e47657ad750b0b2b61a7d9d4ce482b75b83a1 ) diff --git a/Modules/Remote/AnisotropicDiffusionLBR.remote.cmake b/Modules/Remote/AnisotropicDiffusionLBR.remote.cmake index ebb228d345f..89cba6271ff 100644 --- a/Modules/Remote/AnisotropicDiffusionLBR.remote.cmake +++ b/Modules/Remote/AnisotropicDiffusionLBR.remote.cmake @@ -20,5 +20,5 @@ itk_fetch_module(AnisotropicDiffusionLBR http://insight-journal.org/browse/publication/953 " GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR.git - GIT_TAG 50acf46da9fa1480eb502a0bb550c36d518893eb + GIT_TAG c4aaaa4281421b2ba6ce79225aca2392d06aabe8 ) diff --git a/Modules/Remote/BioCell.remote.cmake b/Modules/Remote/BioCell.remote.cmake index 876a309cd85..afc506622eb 100644 --- a/Modules/Remote/BioCell.remote.cmake +++ b/Modules/Remote/BioCell.remote.cmake @@ -4,5 +4,5 @@ It has classes to represent cells' shape, color, and growth state. It also has classes to represent a cell genome, whose expression is modeled by differential equations." GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKBioCell.git - GIT_TAG 2425941b2ab3957d88afe4d357d0d43507830d7d + GIT_TAG a57cb81961a94073990adcd7106bc7adf9ca9988 ) diff --git a/Modules/Remote/BridgeNumPy.remote.cmake b/Modules/Remote/BridgeNumPy.remote.cmake index 222e5d5e461..3ec3cf1195c 100644 --- a/Modules/Remote/BridgeNumPy.remote.cmake +++ b/Modules/Remote/BridgeNumPy.remote.cmake @@ -21,5 +21,5 @@ itk_fetch_module(BridgeNumPy See http://insight-journal.org/browse/publication/85 https://hdl.handle.net/1926/188" GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKBridgeNumPy.git - GIT_TAG 5ffa0941ecf9c605583e32aede55a644b6b65df2 + GIT_TAG e74bdafc2824c7f63fdc7c0e36ae843db0c92393 ) diff --git a/Modules/Remote/Cuberille.remote.cmake b/Modules/Remote/Cuberille.remote.cmake index 1eb8a332651..17dd1750f7f 100644 --- a/Modules/Remote/Cuberille.remote.cmake +++ b/Modules/Remote/Cuberille.remote.cmake @@ -17,5 +17,5 @@ A more detailed description can be found in the Insight Journal article: http://www.insight-journal.org/browse/publication/213 " GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKCuberille.git - GIT_TAG f664b26e1ba24d8ae64d88d86dce1f6898202d59 + GIT_TAG da10ebae58bfb25f3b2aa42f1285fa2f3c0a6bc5 ) diff --git a/Modules/Remote/DVMeshNoise.remote.cmake b/Modules/Remote/DVMeshNoise.remote.cmake index 5abb7044e92..74616a0a17d 100644 --- a/Modules/Remote/DVMeshNoise.remote.cmake +++ b/Modules/Remote/DVMeshNoise.remote.cmake @@ -6,4 +6,5 @@ itk_fetch_module(DVMeshNoise http://hdl.handle.net/10380/3567 " GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/DVMeshNoise - GIT_TAG e7a360ec0aad87035d0b231741f63833c0ffe6f7) + GIT_TAG e8b997e8f9b7b3aade00303aefa2d7a6a4965af2 + ) diff --git a/Modules/Remote/FixedPointInverseDisplacementField.remote.cmake b/Modules/Remote/FixedPointInverseDisplacementField.remote.cmake index 05d41b7cac8..b4fb1973180 100644 --- a/Modules/Remote/FixedPointInverseDisplacementField.remote.cmake +++ b/Modules/Remote/FixedPointInverseDisplacementField.remote.cmake @@ -1,5 +1,5 @@ itk_fetch_module(FixedPointInverseDisplacementField "Computes the inverse of a displacement field." GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKFixedPointInverseDisplacementField.git - GIT_TAG 57eec80969458bb1ff9c0da79548f7965e15851f + GIT_TAG b7ba9d062355a5eede44c21449595af51c5656dc ) diff --git a/Modules/Remote/GenericLabelInterpolator.remote.cmake b/Modules/Remote/GenericLabelInterpolator.remote.cmake index 0ca15ecac52..5d42f3bfbe0 100644 --- a/Modules/Remote/GenericLabelInterpolator.remote.cmake +++ b/Modules/Remote/GenericLabelInterpolator.remote.cmake @@ -1,5 +1,5 @@ itk_fetch_module(GenericLabelInterpolator "A generic interpolator for multi-label images." GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKGenericLabelInterpolator.git - GIT_TAG 210c3e6eeece4875ac7d331460b3a4d2e4f6db60 + GIT_TAG 49ecea7d1414ba8ff3abc96f82e4bd76c2df1529 ) diff --git a/Modules/Remote/IOFDF.remote.cmake b/Modules/Remote/IOFDF.remote.cmake index f6fd0b9ca18..eb7d100df9d 100644 --- a/Modules/Remote/IOFDF.remote.cmake +++ b/Modules/Remote/IOFDF.remote.cmake @@ -1,5 +1,5 @@ itk_fetch_module(IOFDF "FDFImageIO plugin for ITK. Authors Gleen Pierce/Nick Tustison/Kent Williams" GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/itkFDFImageIO.git - GIT_TAG 9624e4315629541d309eec377d122f152a5d61a6 + GIT_TAG fbe4f169ec3845e0d7cae59aa831097f71fa4ca8 ) diff --git a/Modules/Remote/IOSTL.remote.cmake b/Modules/Remote/IOSTL.remote.cmake index d53e06f323d..ebbf2af9300 100644 --- a/Modules/Remote/IOSTL.remote.cmake +++ b/Modules/Remote/IOSTL.remote.cmake @@ -3,5 +3,5 @@ itk_fetch_module(IOSTL "This module contains classes for reading and writing QuadEdgeMeshes using the STL (STereoLithography)file format. https://hdl.handle.net/10380/3452" GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKSTLMeshIO.git - GIT_TAG 6e01a0e741a3c80533bf1c773d01daafe1dc263e + GIT_TAG a03137ffbc674c1f51b31b25e4347a93f4682cc7 ) diff --git a/Modules/Remote/IOTransformDCMTK.remote.cmake b/Modules/Remote/IOTransformDCMTK.remote.cmake index fb4f4a7fc67..8a1c246abd6 100644 --- a/Modules/Remote/IOTransformDCMTK.remote.cmake +++ b/Modules/Remote/IOTransformDCMTK.remote.cmake @@ -4,5 +4,5 @@ itk_fetch_module(IOTransformDCMTK files. See http://www.insight-journal.org/browse/publication/923 https://hdl.handle.net/10380/3468" GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKIOTransformDCMTK.git - GIT_TAG f6372c4861e7a77ebeab33b3c5e7d29f6502aa58 + GIT_TAG b8be2bd4cd8ae9c78da8f305752d225f847ef31f ) diff --git a/Modules/Remote/IsotropicWavelets.remote.cmake b/Modules/Remote/IsotropicWavelets.remote.cmake index 9770b86ad97..8233eb76f6c 100644 --- a/Modules/Remote/IsotropicWavelets.remote.cmake +++ b/Modules/Remote/IsotropicWavelets.remote.cmake @@ -8,4 +8,4 @@ Cerdan, P.H. \"Steerable Isotropic Wavelets for Multiscale and Phase Analysis\". November, 2016. " GIT_REPOSITORY ${git_protocol}://github.com/phcerdan/ITKIsotropicWavelets.git - GIT_TAG 3ca6f7b154611c128eb67af6d3b1fa76fea2ef02) + GIT_TAG 6d1616f13f34987332b0b446b079ff4dae6c2787) diff --git a/Modules/Remote/LesionSizingToolkit.remote.cmake b/Modules/Remote/LesionSizingToolkit.remote.cmake index f675431e714..c519e949ead 100644 --- a/Modules/Remote/LesionSizingToolkit.remote.cmake +++ b/Modules/Remote/LesionSizingToolkit.remote.cmake @@ -1,5 +1,5 @@ itk_fetch_module(LesionSizingToolkit "Framework for determining the sizes of lesions in medical images." GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/LesionSizingToolkit.git - GIT_TAG d2da44b029795d38b02d29a88c62487efb73e363 + GIT_TAG 33104fc1d375bb096e3337253dd6d9c74658f386 ) diff --git a/Modules/Remote/MinimalPathExtraction.remote.cmake b/Modules/Remote/MinimalPathExtraction.remote.cmake index 21baef91279..a70a290338d 100644 --- a/Modules/Remote/MinimalPathExtraction.remote.cmake +++ b/Modules/Remote/MinimalPathExtraction.remote.cmake @@ -3,5 +3,5 @@ itk_fetch_module(MinimalPathExtraction "http://www.insight-journal.org/browse/publication/213 " GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKMinimalPathExtraction.git - GIT_TAG 5a2017ef5d5c25db518ecae49408598f906dd307 + GIT_TAG 5ff0e26837fed4d17c9590c82139d8e3ffc714e2 ) diff --git a/Modules/Remote/MorphologicalContourInterpolation.remote.cmake b/Modules/Remote/MorphologicalContourInterpolation.remote.cmake index 5719ebc1cca..4aeedbc61ee 100644 --- a/Modules/Remote/MorphologicalContourInterpolation.remote.cmake +++ b/Modules/Remote/MorphologicalContourInterpolation.remote.cmake @@ -14,5 +14,5 @@ IEEE Trans Biomed Eng. 2008 Aug;55(8):2022-38. doi: 10.1109/TBME.2008.921158. This work is supported by NIH grant R01 EB014346 'Continued development and maintenance of the ITK-SNAP 3D image segmentation software'." GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/ITKMorphologicalContourInterpolation.git - GIT_TAG 97acd59ea7697731ef4d01ba330097326fdb6bf8 + GIT_TAG 04baa12efb3c01f74719682ece22b58165dc548c ) diff --git a/Modules/Remote/MultipleImageIterator.remote.cmake b/Modules/Remote/MultipleImageIterator.remote.cmake index 8b9b428c8d6..3b63dcae820 100644 --- a/Modules/Remote/MultipleImageIterator.remote.cmake +++ b/Modules/Remote/MultipleImageIterator.remote.cmake @@ -13,5 +13,5 @@ Schaerer J. \"A MultipleImageIterator for iterating over multiple images simulta December, 2014. " GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/MultipleImageIterator.git - GIT_TAG 1105469ce1c2cc289008d9cb6bebde487a39ae3e + GIT_TAG a479c440bdeff9d80b0f329d4b1b73bc0044fd60 ) diff --git a/Modules/Remote/NeuralNetworks.remote.cmake b/Modules/Remote/NeuralNetworks.remote.cmake index 4df80a98294..3b03f998389 100644 --- a/Modules/Remote/NeuralNetworks.remote.cmake +++ b/Modules/Remote/NeuralNetworks.remote.cmake @@ -3,5 +3,5 @@ itk_fetch_module(NeuralNetworks for the calculation of artificial neural networks. This can be used, for instance, for image classification." GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKNeuralNetworks.git - GIT_TAG 77d6450708c626ca53e4660602275800c8841884 + GIT_TAG bc8b1aa63f9d34e17339e87e91c2e260bbb9b49c ) diff --git a/Modules/Remote/PerformanceBenchmarking.remote.cmake b/Modules/Remote/PerformanceBenchmarking.remote.cmake index 4861b812bbc..16d4a96abd7 100644 --- a/Modules/Remote/PerformanceBenchmarking.remote.cmake +++ b/Modules/Remote/PerformanceBenchmarking.remote.cmake @@ -15,5 +15,5 @@ For more information, see:: http://insight-journal.org/browse/publication/972 " GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKPerformanceBenchmarking.git - GIT_TAG e07106507f6b7fd4fe0707c2ee463f56f53e637d + GIT_TAG 042e86b919edc4d9ebb8c5d4a45cae0adb16ddd9 ) diff --git a/Modules/Remote/PolarTransform.remote.cmake b/Modules/Remote/PolarTransform.remote.cmake index 55c8a964218..ca0a5005ac4 100644 --- a/Modules/Remote/PolarTransform.remote.cmake +++ b/Modules/Remote/PolarTransform.remote.cmake @@ -11,5 +11,5 @@ For more information, see the Insight Journal article: http://insight-journal.org/browse/publication/130 " GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKPolarTransform.git - GIT_TAG f531f3d3f8bcf9c5aefe0a961c901caebcc86348 + GIT_TAG a21d4c481bdea28143adb8a2f3766482cecdd6ab ) diff --git a/Modules/Remote/PrincipalComponentsAnalysis.remote.cmake b/Modules/Remote/PrincipalComponentsAnalysis.remote.cmake index b9330c78dac..6056e4aa90e 100644 --- a/Modules/Remote/PrincipalComponentsAnalysis.remote.cmake +++ b/Modules/Remote/PrincipalComponentsAnalysis.remote.cmake @@ -8,5 +8,5 @@ A more detailed description can be found in the Insight Journal article: August, 2013. " GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKPrincipalComponentsAnalysis.git - GIT_TAG 36120bcc4937f9a9e558280609088755ab180c1e + GIT_TAG 22bef7e72f980abcf418e87af772054e1d1bea0f ) diff --git a/Modules/Remote/RLEImage.remote.cmake b/Modules/Remote/RLEImage.remote.cmake index 765cba8b16e..9f41a7bea39 100644 --- a/Modules/Remote/RLEImage.remote.cmake +++ b/Modules/Remote/RLEImage.remote.cmake @@ -9,5 +9,5 @@ http://hdl.handle.net/10380/3562 This work is supported by NIH grant R01 EB014346 'Continued development and maintenance of the ITK-SNAP 3D image segmentation software'." GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/ITKRLEImage.git - GIT_TAG c7401fa08823acfd69c7c477f9b7fd2224bcab22 + GIT_TAG 520cc0fb9c32d888e996f7e9b6c854868e43ba98 ) diff --git a/Modules/Remote/SCIFIO.remote.cmake b/Modules/Remote/SCIFIO.remote.cmake index 92bb74cfacf..da518ea4021 100644 --- a/Modules/Remote/SCIFIO.remote.cmake +++ b/Modules/Remote/SCIFIO.remote.cmake @@ -1,5 +1,5 @@ itk_fetch_module(SCIFIO "SCIFIO (Bioformats) ImageIO plugin for ITK" GIT_REPOSITORY ${git_protocol}://github.com/scifio/scifio-imageio.git - GIT_TAG 853c9e8beb48d6b62f6cffa2bb010f59b7240fcc + GIT_TAG 6f93ec48efb668618dd842bb6076430819eb6da1 ) diff --git a/Modules/Remote/Strain.remote.cmake b/Modules/Remote/Strain.remote.cmake index 419a2649f20..f69c80851e8 100644 --- a/Modules/Remote/Strain.remote.cmake +++ b/Modules/Remote/Strain.remote.cmake @@ -11,6 +11,6 @@ For more information, see: http://hdl.handle.net/10380/3573 http://insight-journal.org/browse/publication/984 " - GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKStrain.git - GIT_TAG 337f5c26efaf851a06e24beb6d8dbdd3f21f9853 + GIT_REPOSITORY ${git_protocol}://github.com/KitwareMedical/ITKStrain.git + GIT_TAG 6bee80f7d609866a092828a4dfa36e05b1473106 ) diff --git a/Modules/Remote/TBBImageToImageFilter.remote.cmake b/Modules/Remote/TBBImageToImageFilter.remote.cmake index e98cb0339cb..2fd11b694ec 100644 --- a/Modules/Remote/TBBImageToImageFilter.remote.cmake +++ b/Modules/Remote/TBBImageToImageFilter.remote.cmake @@ -4,5 +4,5 @@ itk_fetch_module(TBBImageToImageFilter This module contains a class inheriting from `itk::ImageToimageFilter` that aim to optimize thread management using the TBB library. Insight Journal article: http://www.insight-journal.org/browse/publication/974" GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTBBImageToImageFilter.git - GIT_TAG 8f84d0dc9d09a5ff47460646fd99905c3c2b759e + GIT_TAG 73e3a110f5803c94a12d29f7566680feb110b090 ) diff --git a/Modules/Remote/TextureFeatures.remote.cmake b/Modules/Remote/TextureFeatures.remote.cmake index e20d760faf4..6e99da867de 100644 --- a/Modules/Remote/TextureFeatures.remote.cmake +++ b/Modules/Remote/TextureFeatures.remote.cmake @@ -13,6 +13,5 @@ For more information, see: http://insight-journal.org/browse/publication/985 " GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTextureFeatures.git - # Git master 2017-11-01 - GIT_TAG 9eaa9a533b21f1c614647487e409619165752746 + GIT_TAG d16cf18c962bd4f588d8b9db1fce42e5860f73de ) diff --git a/Modules/Remote/TwoProjectionRegistration.remote.cmake b/Modules/Remote/TwoProjectionRegistration.remote.cmake index 151558dce32..cbcc1945867 100644 --- a/Modules/Remote/TwoProjectionRegistration.remote.cmake +++ b/Modules/Remote/TwoProjectionRegistration.remote.cmake @@ -18,5 +18,5 @@ Wu, J. \"ITK-Based Implementation of Two-Projection 2D/3D Registration Method wi December, 2010. " GIT_REPOSITORY ${git_protocol}://github.com/InsightSoftwareConsortium/ITKTwoProjectionRegistration.git - GIT_TAG 131418cc963f00d750beb2105fd96e5ed64ebfc6 + GIT_TAG 0a286fe220cd3fc689d6e836559b5a2ee91d5422 ) diff --git a/Modules/Remote/WikiExamples.remote.cmake b/Modules/Remote/WikiExamples.remote.cmake index 0d383b5d47e..92edc8d003d 100644 --- a/Modules/Remote/WikiExamples.remote.cmake +++ b/Modules/Remote/WikiExamples.remote.cmake @@ -4,8 +4,7 @@ # If the environment var WikiExamplesTag exists, use it if (NOT DEFINED ENV{WikiExamplesTag}) - # December 26, 2016 - set(GIT_TAG ef997a295367dbc169118066069748cdf61fdc14) + set(GIT_TAG 42f2f83b158e56fcac71c0051a70eeac1bd8c4dd) else() set(GIT_TAG $ENV{WikiExamplesTag}) endif() diff --git a/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx b/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx index d8f1a049861..8a390e27915 100644 --- a/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx +++ b/Modules/Segmentation/LevelSets/include/itkParallelSparseFieldLevelSetImageFilter.hxx @@ -810,7 +810,7 @@ void ParallelSparseFieldLevelSetImageFilter< TInputImage, TOutputImage > ::ThreadedAllocateData(ThreadIdType ThreadId) { - static ITK_CONSTEXPR_VAR float SAFETY_FACTOR = 4.0; + static constexpr float SAFETY_FACTOR = 4.0; unsigned int i, j; m_Data[ThreadId].m_Condition[0] = ConditionVariable::New(); diff --git a/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoCapture.h b/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoCapture.h index e9ae0a19be3..dfdd4da9746 100644 --- a/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoCapture.h +++ b/Modules/Video/BridgeOpenCV/include/itkOpenCVVideoCapture.h @@ -58,7 +58,7 @@ class ITK_TEMPLATE_EXPORT OpenCVVideoCapture : public cv::VideoCapture typedef OpenCVVideoCapture Self; typedef typename VideoStreamType::FrameType FrameType; typedef typename FrameType::PixelType PixelType; - static ITK_CONSTEXPR_VAR unsigned int Dimensions = FrameType::ImageDimension; + static constexpr unsigned int Dimensions = FrameType::ImageDimension; /** Constructor that initializes internal VideoStream to null */ OpenCVVideoCapture(); diff --git a/Modules/Video/BridgeVXL/include/vidl_itk_istream.h b/Modules/Video/BridgeVXL/include/vidl_itk_istream.h index 462e665ae7e..f0ee41de902 100644 --- a/Modules/Video/BridgeVXL/include/vidl_itk_istream.h +++ b/Modules/Video/BridgeVXL/include/vidl_itk_istream.h @@ -48,7 +48,7 @@ class ITK_TEMPLATE_EXPORT vidl_itk_istream : public vidl_istream typedef typename VideoStreamType::FrameType FrameType; typedef ::itk::SizeValueType FrameOffsetType; typedef typename FrameType::PixelType PixelType; - static ITK_CONSTEXPR_VAR unsigned int Dimensions = FrameType::ImageDimension; + static constexpr unsigned int Dimensions = FrameType::ImageDimension; /** Constructor - default */ vidl_itk_istream(); diff --git a/Modules/Video/Core/test/itkVideoStreamTest.cxx b/Modules/Video/Core/test/itkVideoStreamTest.cxx index ba5c9f3e6af..6a3cc7c605a 100644 --- a/Modules/Video/Core/test/itkVideoStreamTest.cxx +++ b/Modules/Video/Core/test/itkVideoStreamTest.cxx @@ -19,7 +19,7 @@ #include "itkVideoStream.h" // Set up typedefs -static ITK_CONSTEXPR_VAR unsigned int Dimension = 2; +static constexpr unsigned int Dimension = 2; typedef unsigned char PixelType; typedef itk::Image< PixelType, Dimension > FrameType; typedef itk::VideoStream< FrameType > VideoType; diff --git a/Utilities/ITKv5Preparation/ReplaceitkGetObjectMacro.sh b/Utilities/ITKv5Preparation/ReplaceitkGetObjectMacro.sh new file mode 100755 index 00000000000..648c7366f98 --- /dev/null +++ b/Utilities/ITKv5Preparation/ReplaceitkGetObjectMacro.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# \author Hans J. Johnson +# +# Script to process a directory to replace +# outdated macro names with their modern +# conformant names + +function ReplaceCXXString() +{ +oldstring="$1" +newstring="$2" + +# NOTE: Skip processing this file +# NOTE: Skip processing the Migration directory in ITK +git grep -l "${oldstring}" | \ + fgrep -v Migration | \ + fgrep -v ITKv5Preparation | \ + fgrep -v itkMacro.h | \ + fgrep -v itk_compiler_detection.h | fgrep -v CMakeLists.txt |fgrep -v .cmake | \ + xargs sed -i '' -e "s/${oldstring}/${newstring}/g" + +git add -A +git commit -m"COMP: Deprecate use itkGetObjectMacro + +git grep -l \"${oldstring}\" | \ + fgrep -v itk_compiler_detection.h | fgrep -v CMakeLists.txt |fgrep -v .cmake | \ + xargs sed -i '' -e \"s/${oldstring}/${newstring}/g\" + +For a full description of the rational for this change +see: + +commit 08df6afeb32e363104bf1e7a043f4b38d524c364 +Author: Hans Johnson +Date: Sun Dec 2 14:07:01 2012 -0600 +ENH: Get function accessible from const objects + + +" + +echo "WARNING: This script is not intended to be bullet-proof." +echo "WARNING: Please carefully review all changes made to ensure proper behavior." +echo "WARNING: Auto replacements were for itkGetConstObjectMacro, but" +echo " itkGetModifiableObjectMacro is needed in some cases." +echo " manual fixing may be required." +} + +ReplaceCXXString itkGetObjectMacro itkGetConstObjectMacro