title: Ambiguity error in C++17 (template template parameters and default arguments issue)
body: <p>I have code which is differently interpreted by g++ with the <code>c++14</code> and <code>c++17</code> standard flags:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  
  template&lt;class T, class A&gt;
  void func(const std::vector&lt;T, A&gt;&amp;v)
  {
      std::cout &lt;&lt; 1 &lt;&lt; std::endl;
  }
  
  template&lt;typename T, template &lt;typename&gt;class Vector&gt;
  void func(const Vector&lt;T&gt;&amp;v)
  {
      std::cout &lt;&lt; 2 &lt;&lt; std::endl;
  }
  
  void f()
  {
      std::vector&lt;int&gt; v;
      func(v);
  }
  
  int main()
  {
      f();
      return 0;
  }
  </code></pre>
  
  <p>When I'm trying compile this code with command</p>
  
  <blockquote>
    <p>g++ -std=c++14 -Wall -pedantic main.cpp</p>
  </blockquote>
  
  <p>everything works just fine.</p>
  
  <p>But when I'm trying to compile this code with command</p>
  
  <blockquote>
    <p>g++ -std=c++17 -Wall -pedantic main.cpp</p>
  </blockquote>
  
  <p>I get this error:</p>
  
  <pre><code>main.cpp: In function 'void f()':
  main.cpp:19:11: error: call of overloaded 'func(std::vector&lt;int&gt;&amp;)' is ambiguous
       func(v);
             ^
  main.cpp:5:6: note: candidate: 'void func(const std::vector&lt;_Tp, _Alloc&gt;&amp;) [with T = int; A = std::allocator&lt;int&gt;]'
   void func(const std::vector&lt;T, A&gt;&amp;v)
        ^~~~
  main.cpp:11:6: note: candidate: 'void func(const Vector&lt;T&gt;&amp;) [with T = int; Vector = std::vector]'
   void func(const Vector&lt;T&gt;&amp;v)
  </code></pre>
  
  <p>I can't figure out what is wrong with this code from the C++17 standard's point of view.</p>