[Insight-developers] ITK with SunPro compilers

Miller, James V (Research) millerjv at crd . ge . com
Tue, 27 Aug 2002 14:11:44 -0400


I assume we could away with

ITK_CONST_INT(name, value);

Should be abstract this a level further? For instance, ITK_INT_TRAIT()
or something like that?



> -----Original Message-----
> From: Bill Hoffman [mailto:bill.hoffman@kitware.com]
> Sent: Tuesday, August 27, 2002 2:01 PM
> To: insight-developers@public.kitware.com
> Subject: [Insight-developers] ITK with SunPro compilers
> 
> 
> I think we are at a new road block with the SunPro compilers.
> It is the same one that killed us with the Borland compiler.
> It may be time to think of a macro to handle the problem.
> It is the enum hack for getting the dimension out of the
> class type.
> 
> 
> // SunPro likes this
>   static const int ImageDimension = VImageDimension;
> // VC likes this:
>   enum { ImageDimension = VImageDimension };
> 
> Both are valid, but the const int one is cleaner.
> We could do this with a macro:
> ITK_CONST_INT(type, name, value)
> which would expand to the enum version for microsoft
> and the const int for the rest of the compilers.
> 
> 
> 
> -Bill
> 
> 
> 
> _______________________________________________
> Insight-developers mailing list
> Insight-developers@public.kitware.com
> http://public.kitware.com/mailman/listinfo/insight-developers
>