title: Clang issue: implicit type conversion at construction time
body: <h1>Synopsis</h1>
  
  <p>I am struggling with making C++11 code Clang compatible and ran into a case where GCC >= 4.6 accepts code and Clang >= 3.1 doesn't. Clang deems a <code>candidate constructor not viable</code>.</p>
  
  <h1>Details</h1>
  
  <p>Here is a trimmed down example to illustrate the issue:</p>
  
  <pre><code>#include &lt;utility&gt;
  
  template &lt;typename...&gt;
  struct T;
  
  template&lt;&gt;
  struct T&lt;&gt;
  {
      typedef T super;
  
      constexpr T() { }
  
      template &lt;typename... Args&gt;
      T(Args&amp;&amp;...) { }
  
  };
  
  template &lt;typename Head, typename... Tail&gt;
  struct T&lt;Head, Tail...&gt; : T&lt;Tail...&gt;
  {
      typedef T&lt;Tail...&gt; super;
  
      Head head;
  
      T(Head arg) : super(), head(std::move(arg)) { }
  };
  
  
  struct void_type
  {
      constexpr void_type() { }
      constexpr void_type(const void_type&amp;) { }
      void_type&amp; operator=(const void_type&amp;) = default;
  
      template &lt;typename Arg0, typename... Args&gt;
      void_type(Arg0&amp;&amp;, Args&amp;&amp;...) { }
  };
  
  struct atom { };
  
  int main()
  {
      atom a;
      T&lt;void_type&gt; t(a);
  
      return 0;
  }
  </code></pre>
  
  <p>The error I get is:</p>
  
  <pre><code>ctor-init.cpp:44:18: error: no matching constructor for initialization of 'T&lt;void_type&gt;'
      T&lt;void_type&gt; t(a);
                   ^ ~
  ctor-init.cpp:19:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'atom' to 'const T&lt;void_type&gt;' for 1st argument;
  struct T&lt;Head, Tail...&gt; : T&lt;Tail...&gt;
         ^
  ctor-init.cpp:25:5: note: candidate constructor not viable: no known conversion from 'atom' to 'void_type' for 1st argument;
      T(Head arg) : super(), head(std::move(arg)) { }
      ^
  1 error generated.
  </code></pre>
  
  <p>I do not understand why clang complains about the lack of a conversion possibility, because I think this "catch-all" constructor should work:</p>
  
  <pre><code>template &lt;typename Arg0, typename... Args&gt;
  void_type(Arg0&amp;&amp;, Args&amp;&amp;...) { }
  </code></pre>
  
  <p>So the error I am confused about is:</p>
  
  <pre><code>ctor-init.cpp:25:5: note: candidate constructor not viable: no known conversion from 'atom' to 'void_type' for 1st argument;
      T(Head arg) : super(), head(std::move(arg)) { }
      ^
  </code></pre>
  
  <p>After all, GCC accepts the code. Is this perhaps a Clang bug? (I am using the latest Clang from the LLVM git repository.)</p>