[Insight-developers] When to use ITK_TYPENAME ?

Lorensen, William E (CRD) lorensen@crd.ge.com
Fri, 22 Feb 2002 06:58:09 -0500


Currently we use it when the compilers can't agree on when typename is appropriate.

-----Original Message-----
From: Luis Ibanez [mailto:luis.ibanez@kitware.com]
Sent: Thursday, February 21, 2002 5:08 PM
To: insight-dev-list
Subject: [Insight-developers] When to use ITK_TYPENAME ?



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


_______________________________________________
Insight-developers mailing list
Insight-developers@public.kitware.com
http://public.kitware.com/mailman/listinfo/insight-developers