On 1/17/07, <b class="gmail_sendername">Dennis Jen</b> &lt;<a href="mailto:dsjen@nmr.mgh.harvard.edu">dsjen@nmr.mgh.harvard.edu</a>&gt; wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>&nbsp;&nbsp;When I upgraded from ITK 2.6.0 to 3.0.0, I got a compile error in a<br>filter I was working on.&nbsp;&nbsp;It looks like the itkStaticConstMacro is only<br>valid for the integer type now.&nbsp;&nbsp;This line:<br><br>&nbsp;&nbsp;itkStaticConstMacro( DEFAULT_REPLICA_EXCHANGE_PROBABILITY, double, 
0.05 )<br><br>causes the following error:<br><br>MY_PATH/itkPoistatsFilter.h:375: error: enumerator value for<br>`DEFAULT_REPLICA_EXCHANGE_PROBABILITY&#39; not integer constant</blockquote><div><br>itkStaticConstMacro should be used only for &quot;unsigned int&quot; and &quot;int&quot; as long as ITK supports 
VS6.0, gcc &lt;= 2.95. The change that was made to itkMacro prompting your error enforced it for all gcc compilers regardless of whether it was allowed.<br><br>The point is that itkStaticConstMacro uses a &quot;static const&quot; on a few compilers and an &quot;enum&quot; on those where the former doesn&#39;t work.&nbsp; And enum&#39;s are integer enumerations. 
<br><br>So in the interest of portability please do not use itkStaticConstMacro for doubles.&nbsp; Just do<br><br>&nbsp; static const double DEFAULT_REPLICA_EXCHANGE_PROBABILITY = 0;<br><br>Thanks<br>-karthik<br> </div></div>