[Insight-developers] ITK with SunPro compilers

Bill Hoffman bill . hoffman at kitware . com
Tue, 27 Aug 2002 14:00:30 -0400


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