traits and numeric_limits

Luis Ibanez ibanez at cs.unc.edu
Mon May 22 15:57:55 EDT 2000


Hi Will,

The   #if     worked fine,
it select the right header 
file  with gcc 2.95.1 on SunOS

There were however some things
that gave me trouble.


1) in  itkImageIterator.h lines 68 and 93
   there is a "," missing between 
   TPixel and TDimension.
   
2) in itkNumericTraits.h line 38 and 41 the 
   "typename" keyword is not necesary.
    
   typedef typename T ValueType ->   typedef T ValueType

3) on the contrary, "typename" is needed in file
   itkPixelTraits.h line 48 for

   static itkNumericTraits< typename T::ValueType >

   it indicates that "ValueType" in the class T, is
   a type, and not a function or a data member.


4) In itkImageScalarIterator.h  lines 36 and 43 
   "typename" is needed befor "TPixel::ScalarType".

   in general "typename" is needed whenever
   we use a type that is defined internally in a class
   that is used as the parameter for the template.

5) in itkImage.h  line 45 
    "typename is not needed because the type itkSmart...
   is clearly visible as a type.



Anyway, only (2) and (3) are directly 
related with itkNumericTraits.


Luis



On Mon, 22 May 2000, Will Schroeder wrote:

> Hi Luis, Jim -
> 
> I modified itkNumericTraits.h to include <limits> on the PC, and ../Insight3DParty/vxl/vnl/vnl_numeric_limits.h
> on everything else, plus created a #define ITK_NUMERIC_LIMITS. Could you (and anyone with a Unix system)
> please check this out...the #ifdef is probably not right for Unix systems because some do have a <limits> file.
> 
> Will
> 
> 





More information about the Insight-developers mailing list