title: Why does adding two string literals not use operator+?
body: <p>Edit: I have reformatted the post to be clearer. </p>
  
  <p>Why does this work:</p>
  
  <pre><code>struct A {};
  
  struct B {
      B(A){}
  };
  
  void operator+(const B&amp;, const B&amp;) {}
  
  int main()
  {
      A a1, a2;
      a1 + a2;
  }
  </code></pre>
  
  <p>and this does not?</p>
  
  <pre><code>struct B {
      B(const char*){}
  };
  
  void operator+(const B&amp;, const B&amp;) {} //error: invalid operands of types 'const char [6]' and 'const char [6]' to binary 'operator+'|
  
  int main()
  {
      "Hello" + "world";
  }
  </code></pre>
  
  <p>Essentially, in the first example <code>a1</code> and <code>a2</code> both convert to <code>B</code> objects through the implicit conversion and use the <code>operator+(const B&amp;, const B&amp;)</code> to add. </p>
  
  <p>Following from this example, I would have expected <code>"Hello"</code> and <code>"world"</code> to convert to <code>B</code> objects, again through the implicit constructor, and use <code>operator+(const B&amp;, const B&amp;)</code> to add to each other. Instead there is an error, which indicates the C-style strings do not attempt a user-defined conversion to <code>B</code> in order to add. Why is this? Is there a fundamental property that prevents this?</p>