C++ methods which take templated classes as argument
<p>I have a templated class</p>

<pre><code>Vector&lt;class T, int N&gt; 
</code></pre>

<p>Where T is the type of the components (double for example) and n the number of components (so N=3 for a 3D vector)</p>

<p>Now I want to write a method like</p>

<pre><code>double findStepsize(Vector&lt;double,2&gt; v)
{..}
</code></pre>

<p>I want to do this also for three and higher dimensional vectors. Of course I could just introduce further methods for higher dimensions, but the methods would have a lot of redundant code, so I want a more generic solution. Is there a way to create a method which takes a templated class without further specializing it (in this case without specifying T or N)? Like</p>

<pre><code>double findStepsize(Vector&lt;T,N&gt; v)
</code></pre>

<p>?</p>
