[Insight-developers] When to use ITK_TYPENAME ?

Luis Ibanez luis.ibanez@kitware.com
Thu, 21 Feb 2002 17:08:24 -0500


A macro ITK_TYPENAME was added to itkWin32Header.h

According to the comment it seems that it is required for
default template parameters only (because VC++ doesn't
support "typename" there)

It looks like that should be used for things like:

template< typename PixelType = ITK_TYPENAME Image<float,2>::PixelType >
MyClass
{
};


but we are using it in arguments of templates. In ImageFunctions
for example:

template <class TInputImage, class TCoordRep = float >
class ITK_EXPORT MeanImageFunction :
         public ImageFunction< TInputImage,
                  ITK_TYPENAME NumericTraits<typename 
TInputImage::PixelType>::RealType,
                  TCoordRep >



What should be the right use of ITK_TYPENAME ?

Thanks


     Luis