title: How to resolve this call to ambiguous constructor by making one of the must be explicit?
body: <p>In the following code, I construct an instance of <code>Node</code> by passing an instance of <code>Point</code>. e.g. <code>Node{{0, 1}};</code> However, the call to <code>Node</code>'s constructor is ambiguous. My guess it that <code>{0, 1}</code> can also be comprehended as two <code>int</code> representations of <code>char</code>, and <code>{char, char}</code> also applies to the constructor of <code>std::string</code>, in the form of <code>std::initializer_list&lt;char&gt;</code>.</p>
  
  <p>I want to preserve the ability to construct <code>Node</code> conviniently as <code>Node{{0, 1}}</code> while also retain the conversion from <code>std::string</code> to <code>Node</code>, preferebly in the form of <code>Node{std::string{"0,1"}}</code> or something like that. Is there a way to call the constructor that takes a string <strong>only if</strong> I specifies it to do so? or simply disable the <code>std::string</code>'s constructor of <code>std::initializer_list&lt;char&gt;</code>?</p>
  
  <p>Thanks in adavance.</p>
  
  <pre><code>#include &lt;string&gt;
  
  class Point
  {
  public:
      Point() {};
      Point(int x, int y) : x(x), y(y) {}
  private:
      int x;
      int y;
  };
  
  class Node
  {
  public:
      Node(const std::string&amp; str) {}
      Node(const Point&amp; dot) : dot(dot) {}
  private:
      Point dot;
  };
  
  int main()
  {
      Node{{0, 1}};
      return 0;
  }
  </code></pre>
  
  <p>Error Message:</p>
  
  <pre><code>/Users/cpp_sandbox.cpp:24:5: error: call to constructor of 'Node' is ambiguous
      Node{{0, 1}};
      ^   ~~~~~~~~
  /Users/cpp_sandbox.cpp:16:5: note: candidate constructor
      Node(const std::string&amp; str) {}
      ^
  /Users/cpp_sandbox.cpp:17:5: note: candidate constructor
      Node(const Point&amp; dot) : dot(dot) {}
      ^
  1 error generated.
  [Finished in 0.1s with exit code 1]
  [shell_cmd: g++ -std=c++11 "/Users/cpp_sandbox.cpp" -o "/Users/cpp_sandbox"]
  [dir: /Users]
  [path: /usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/X11/bin:/Applications/SquishCoco/:/Library/TeX/texbin]
  </code></pre>