[Insight-developers] ITK with SunPro compilers

Brad King brad . king at kitware . com
Wed, 4 Sep 2002 11:45:39 -0400 (EDT)


> Does this look like the macro we need? I change the suggested name of
> the macro from ITK_STATIC_CONST to itkStaticConstMacro to make is
> consistent with our itkSetMacro(), itkNewMacro() etc.
>
>
> #if defined(_MSC_VER) && (_MSC_VER <= 1300)
> #   define ITK_NO_INCLASS_MEMBER_INITIALIZATION
> #endif
> #if defined(__SUBPRO_CC) && (__SUNPRO_CC <= 0x520)
> #   define ITK_NO_INCLASS_MEMBER_INITIALIZATION
> #endif
>
> #ifdef ITK_NO_INCLASS_MEMBER_INITIALIZATION
> #     define itkStaticConstMacro(type, assignment) enum { assignment }
> #else
> #     define itkStaticConstMacro(type, assignment) static const type assignment
> #endif

Yes, this is it exactly.  Good call on the name change.  This will need to
be used for all the ImageDimension enumeration values we currently have.

-Brad