<p>Suppose I have code like this:</p>

<pre><code>template&lt;class T, T initial_t&gt; class Bar {
  // something
}
</code></pre>

<p>And then try to use it like this:</p>

<pre><code>Bar&lt;Foo*, NULL&gt; foo_and_bar_whatever_it_means_;
</code></pre>

<p>GCC bails out with error (on the above line):</p>

<blockquote>
  <p>could not convert template argument
  '0' to 'Foo*'</p>
</blockquote>

<p>I found this thread: <a href="http://gcc.gnu.org/ml/gcc-help/2007-11/msg00066.html" rel="nofollow noreferrer">http://gcc.gnu.org/ml/gcc-help/2007-11/msg00066.html</a>, but I have to use NULL in this case (ok, I could probably refactor - but it would not be trivial; any suggestions?). I tried to overcome the problem by creating a variable with value of NULL, but GCC still complains that I pass variable and not address of variable as a template argument. And reference to a variable initialized with default ctor would not be the same as NULL.</p>

Have you tried:
```
```
Bar<Foo*, (Foo*)NULL> foo_and_bar_whatever_it_means_;
```
```
?
or reinterpret_cast(0)?