title: call of overloaded <brace-enclosed initializer list> is ambiguous, how to deal with that?
body: <p>I really don't understand this, I thought that compiler first executes what is in braces and then gives the result to the most appropriate function. Here it looks like it gives the function an initializer list to deal with it...</p>
  
  <pre><code>#include &lt;string&gt;
  #include &lt;vector&gt;
  using namespace std;
  
  void func(vector&lt;string&gt; v) { }
  
  void func(vector&lt;wstring&gt; v) { }
  
  int main() {
    func({"apple", "banana"});
  }
  </code></pre>
  
  <p>error:</p>
  
  <pre><code>&lt;stdin&gt;: In function 'int main()':
  &lt;stdin&gt;:11:27: error: call of overloaded 'func(&lt;brace-enclosed initializer list&gt;)' is ambiguous
  &lt;stdin&gt;:11:27: note: candidates are:
  &lt;stdin&gt;:6:6: note: void func(std::vector&lt;std::basic_string&lt;char&gt; &gt;)
  &lt;stdin&gt;:8:6: note: void func(std::vector&lt;std::basic_string&lt;wchar_t&gt; &gt;)
  </code></pre>
  
  <p><strong>Why isn't my <code>func(vector&lt;string&gt; v)</code> overload called, and can I make it so?</strong></p>