how to overload << operator of class template with non-type parameter?
<p>I'm trying to overload <code>operator&lt;&lt;</code> of a class template , like this:</p>

<pre><code>template&lt;int V1,int V2&gt;
class Screen
{
    template&lt;int T1,int T2&gt; friend ostream&amp; operator&lt;&lt; (ostream &amp;,Screen&lt;T1,T2&gt;&amp;);  
    private:
        int width;  
        int length;
    public:
        Screen():width(V1),length(V2){}
};
template&lt;int T1,int T2&gt;
ostream&amp; operator&lt;&lt; (ostream &amp;os,Screen&lt;T1,T2&gt; &amp;screen)
{
    os &lt;&lt; screen.width &lt;&lt; ' ' &lt;&lt; screen.length;
    return os;
}
</code></pre>

<p>the code above is running corrent!but i want to know if there is any way to overload <code>operator&lt;&lt;</code> in a way by not setting it as a function template:</p>

<p><code>friend ostream&amp; operator&lt;&lt; (ostream &amp;,Screen&lt;T1,T2&gt;&amp;);</code>
?</p>
