Easy template implementing
<p>Suppose I've written class template declaration somewhere in <code>collector.h</code>:</p>

<pre><code>template &lt;class T, int maxElements&gt;
class collector {

    T elements[maxElements];
    int activeCount;

public:

    collector();
    void process();
    void draw();

};
</code></pre>

<p>and implementing its three methods in <code>collector.cpp</code>:</p>

<pre><code>template &lt;class T, int maxElements&gt; 
collector&lt;T, maxElements&gt;::collector(){
    //code here
}

template &lt;class T, int maxElements&gt;
void collector&lt;T, maxElements&gt;::process(){
    //code here
}

template &lt;class T, int maxElements&gt;
void collector&lt;T, maxElements&gt;::draw(){
    //code here
}
</code></pre>

<p>Is there any way of not writing <code>template &lt;class T, int maxElements&gt;</code> and <code>&lt;T, maxElements&gt;</code>
for every function's implementation? Something like that:</p>

<pre><code>template &lt;class T, int maxElements&gt;{

    collector&lt;T, maxElements&gt;::collector(){
        //code here
    }

    void collector&lt;T, maxElements&gt;::process(){
        //code here
    }

    void collector&lt;T, maxElements&gt;::draw(){
        //code here
    }

}
</code></pre>
