title: C++ template constructor default arguments
body: <p>In a very simple way. We have following code:</p>
  
  <pre><code>struct templateTest{
      struct {}m_none;
      template &lt;typename T1, typename T2, typename T3, typename T4&gt;
      templateTest(T1 arg1, T2 arg2=m_none, T3 arg3=m_none, T4 arg4=m_none){
  
      }
  };
  
  struct nonTemplate{
      nonTemplate(int arg1, int arg2=2, int arg3=3){}
  };
  
  int main()
  {
      nonTemplate(5);
      nonTemplate(5,10);
  
      templateTest test2(5,10);
      templateTest test1(5);
  
  
      return 0;
  }
  </code></pre>
  
  <p>What I would like to have is default constructor arguments in template class.</p>
  
  <p>Default arguments work perfectly fine with <code>nonTemplate</code> class, but it's not that way with <code>templateTest</code> type. Error I have are following:</p>
  
  <blockquote>
    <p>C2660: 'templateTest::templateTest' : function does not take 2 arguments</p>
  </blockquote>
  
  <p>for constructor called with 2 arguments</p>
  
  <p>And for constructor called with one argument compiler wants to invoke copyConstructor and output is following:</p>
  
  <blockquote>
    <p>C2664: 'templateTest::templateTest(const templateTest &amp;)' : cannot convert argument 1 from 'int' to 'const templateTest &amp;'</p>
  </blockquote>
  
  <p>Is there any way to achieve what I want on old C++ compilers, like msvc 2011?</p>