template class with static function
<p>i wanted to create a template class with a static function</p>

<pre><code>template &lt;typename T&gt;
class Memory
{
 public:
  template &lt; typename T&gt;
  static &lt;T&gt;* alloc( int dim )
  {
    T *tmp = new T [ dim ];
    return tmp;
  };
}
</code></pre>

<p>but i will always get</p>

<pre><code>int *a = Memory::alloc&lt;int&gt;(5)
</code></pre>

<p>i dont know what to chance..</p>

<pre><code> »template&lt;class T&gt; class Memory« used without template parameters
 expected primary-expression before »int«
 Fehler: expected »,« or »;« before »int«
</code></pre>
