[Insight-developers] Zero size array fixed : enum problem

Luis Ibanez ibanez@choroid.cs.unc.edu
Sat, 25 Aug 2001 21:47:18 -0400 (EDT)


The problem with zero size array in VC++
was due to a misplaced enum, it was my
mistake.

Bill was right when we discussed this bug
on the tcon.

The code was doing:

  typedef Transform<double, Reference::ImageDimension> TransformType;
  enum { ImageDimension = Reference::ImageDimension }

When it should be:

  enum { ImageDimension = Referencetype::ImageDimension };
  typedef Transform< doubld, ImageDimension > TransformType


Enums from template arguments should not be used directly,
specially if they are going to be used to dimension
arrays. They have to be used to declare a new internal
enum.


This is fixed now


Luis