title: operator overloading, member and non-member function, which one has priority?
body: <p>Say I have a <code>Complex</code> number class and <code>operator+</code> is overloaded twice, both as a member function and as a global function, for example:</p>
  
  <pre><code>class Complex {
  public:
      Complex operator+(const Complex&amp; c);
  };
  Complex operator+(const Complex&amp; a, const Complex&amp; b);
  </code></pre>
  
  <p>And in the main function I will call the operator+ like follows:</p>
  
  <pre><code>Complex a, b;
  Complex c = a + b;
  </code></pre>
  
  <p>Which <code>operator+</code> function will be called? Thanks!</p>