title: cannot appear in a constant-expression
body: <p>In the following c++ program:</p>
  
  <pre><code>static const int row = (dynamic_cast&lt;int&gt;(log(BHR_LEN*G_PHT_COUNT)/log(2)));
  static const int pht_bits = ((32*1024)/(G_PHT_COUNT * G_PHT_COUNT * BHR_LEN));
  unsigned char tab[pht_bits][1&lt;&lt;row];
  </code></pre>
  
  <p>I get the error message <strong>double log(double)’ cannot appear in a constant-expression</strong>.
  why am I getting this problem since i have put an integer cast in front? How should i fix this?</p>