title: using a template class without a template argument
body: <p>I have a Visual Studio 2008 C++ project with a template class that takes the templated value in the constructor like this:</p>
  
  <pre><code>template&lt; typename A &gt;
  struct Foo
  {
      const A&amp; a_;
      Foo( const A&amp; a ) : a_( a ) { };
  };
  </code></pre>
  
  <p>Therefore, I have to construct this class like this:</p>
  
  <pre><code>int myval = 0;
  Foo&lt; int &gt; foo( myval );
  </code></pre>
  
  <p>It seems redundant to have to specify <code>int</code> as a template parameter when it's already specified in the constructor. I'd like some way to use it like this:</p>
  
  <pre><code>Foo foo( myval );
  </code></pre>
  
  <p>As is, I get the compiler error: </p>
  
  <pre><code>error C2955: 'Foo' : use of class template requires template argument list
  </code></pre>
  
  <p>Thanks,
  PaulH</p>