title: c++ variadic template instantiation depth exceeds maximum of 900
body: <p>I am using c++11 variadic template, however the compiler complains template instantiation depth excedds maximun of 900, the code looks like:  </p>
  
  <pre><code>template&lt;typename F1, typename F2&gt;
  composed&lt;F1, F2&gt; compose(F1 f1, F2 f2) {
      return composed&lt;F1, F2&gt;(f1, f2);
  }
  template&lt;typename F1, typename F2, typename... Fs&gt;
  auto compose(F1 f1, F2 f2, Fs... fs) -&gt;decltype(compose(compose(f1, f2), fs...)) {
      return compose(compose(f1, f2), fs...);
  }
  </code></pre>
  
  <p>I am using this template like:</p>
  
  <pre><code>auto composed_func = compose(f1, f2, f3, f4);
  </code></pre>
  
  <p>But if I change the variadic template defination to:</p>
  
  <pre><code>template&lt;typename F1, typename F2, typename F3, typename... Fs&gt;
  auto compose(F1 f1, F2 f2, F3 f3, Fs... fs) -&gt;decltype(compose(compose(f1, f2), f3, fs...)) {
      return compose(compose(f1, f2), f3, fs...);
  }
  </code></pre>
  
  <p>It will work OK.
  I am not clear why this happened. It seems to me that the upper usage also looks valid since it still recursively reduce the args to call compose.  </p>