title: Very strange overload failure
body: <p>I have encountered a very strange overload failure. I am able to isolate the problem, but I cannot for the life of it figure out what goes wrong.</p>
  
  <p>The code is the following</p>
  
  <pre><code>#include &lt;vector&gt;
  #include &lt;iostream&gt;
  
  template&lt;class X&gt;
  class Foo
  {
  public:
    Foo(const std::initializer_list&lt;X&gt; &amp;A){}
    Foo(size_t n){}
  };
  
  class Bar
  {
  public:
    Bar() = default;
    Bar(const Foo&lt;size_t&gt; &amp;A, bool a=true, bool b=true){};
  };
  
  int main()
  {
    Bar A({1,2});
  }
  </code></pre>
  
  <p>Compiling results in </p>
  
  <pre><code>$ clang++ -std=c++14 so.cpp
  
  so.cpp:21:11: error: call to constructor of 'Bar' is ambiguous
        Bar A({1,2});
            ^ ~~~~~
  so.cpp:12:11: note: candidate is the implicit move constructor
      class Bar
            ^
  so.cpp:12:11: note: candidate is the implicit copy constructor
  so.cpp:16:7: note: candidate constructor
        Bar(const Foo&lt;size_t&gt; &amp;A, bool a=true, bool b=true){};
        ^
  1 error generated.
  </code></pre>
  
  <p>The two things that get rid of the problem are:</p>
  
  <ul>
  <li>Removing <code>Foo(size_t n)</code>.</li>
  <li>Changing the constructor to <code>Bar(const Foo&lt;size_t&gt; &amp;A)</code>.</li>
  </ul>
  
  <p><em>Obviously I want to keep all features. So: What goes wrong? How can I solve it?</em></p>