Converting const unsigned int to unsigned int in template parameter
<p>With the following code:</p>

<pre><code>#include &lt;iostream&gt;

template&lt; class T, unsigned int NVectorDimension = 3 &gt;
class Vector
{
};

template&lt; unsigned int TDimension &gt;
int RunTest( void )
{
  const unsigned int VectorDimension = 4;
  typedef Vector&lt; int, VectorDimension &gt;     VectorPixelType;
}

int main(int argc, char *argv[])
{

  return 0;
}
</code></pre>

<p>I get:</p>

<pre><code>In function ‘int RunTest()’:
12:40: error: could not convert template argument ‘VectorDimension’ to ‘unsigned int’
error: invalid type in declaration before ‘;’ token
</code></pre>

<p>Any ideas what is wrong with that?</p>

<p>David</p>
