title: Why variadic template constructor matches better than copy constructor?
body: <p>The following code does not compile:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;utility&gt;
  
  struct Foo
  {
      Foo() { std::cout &lt;&lt; "Foo()" &lt;&lt; std::endl; }
      Foo(int) { std::cout &lt;&lt; "Foo(int)" &lt;&lt; std::endl; }
  };
  
  template &lt;typename T&gt;
  struct Bar
  {
      Foo foo;
  
      Bar(const Bar&amp;) { std::cout &lt;&lt; "Bar(const Bar&amp;)" &lt;&lt; std::endl; }
  
      template &lt;typename... Args&gt;
      Bar(Args&amp;&amp;... args) : foo(std::forward&lt;Args&gt;(args)...)
      {
          std::cout &lt;&lt; "Bar(Args&amp;&amp;... args)" &lt;&lt; std::endl;
      }
  };
  
  int main()
  {
      Bar&lt;Foo&gt; bar1{};
      Bar&lt;Foo&gt; bar2{bar1};
  }
  </code></pre>
  
  <p>Compiler error suggest to me that compiler was trying to use variadic template constructor instead of copy constructor:</p>
  
  <pre><code>prog.cpp: In instantiation of 'Bar&lt;T&gt;::Bar(Args&amp;&amp; ...) [with Args = {Bar&lt;Foo&gt;&amp;}; T = Foo]':
  prog.cpp:27:20:   required from here
  prog.cpp:18:55: error: no matching function for call to 'Foo::Foo(Bar&lt;Foo&gt;&amp;)'
    Bar(Args&amp;&amp;... args) : foo(std::forward&lt;Args&gt;(args)...)
  </code></pre>
  
  <p>Why compiler does that and how to fix it?</p>