title: C++, template variable in non template class
body: <p>I am using the following template classes:</p>
  
  <pre><code>template &lt;class T&gt;
  class Point2D
  {
      private:
              T x;
              T y;
  ...
  };
  
  template &lt;class T&gt;
  class Point2D;
  
  template &lt;class T&gt;
  class Line{
      private:
            Point2D &lt;T&gt; *start;  
            Point2D &lt;T&gt; *start; 
      .... 
  };
  </code></pre>
  
  <p>If I want to create an object Line, it is necessary to write type of the point and type of the Line</p>
  
  <pre><code>int main
  {
       Point2DC&lt;double&gt; p1(0,0);
       Point2DC&lt;double&gt; p2(10,10);
       Line&lt;double&gt; l(&amp;p1,&amp;p2);
       ...
  }
  </code></pre>
  
  <p>I find it rather pointless... If points are double, so Line must be also double... Is it possible to templatize only pointers in class Line and do not templatize all class, something like that</p>
  
  <pre><code>template &lt;class T&gt;
  class Point2D;
  
  class Line{
      private:
            template &lt;class T&gt;
            Point2D &lt;T&gt; *start;  
            Point2D &lt;T&gt; *start; 
      .... 
  };
  </code></pre>
  
  <p>and use</p>
  
  <pre><code>int main
  {
       Point2D&lt;double&gt; p1(0,0);
       Point2D&lt;double&gt; p2(10,10);
       Line l(&amp;p1,&amp;p2);
       ...
  }
  </code></pre>