title: binary operator implemented as a static member function
body: <p>so on my book it reads:</p>
  
  <blockquote>
    <p>The definition of a binary operator implemented as a global function or a <strong>static</strong> member function is the following:
    <code>return_type operator_type (parameter1, parameter2);</code></p>
  </blockquote>
  
  <p>Now I don't understand what the author means by a</p>
  
  <blockquote>
    <p>static member function</p>
  </blockquote>
  
  <p>How I understand it; It is an operator overload inside a class that is <code>static</code> which in my belief is not possible, I don't understand...</p>
  
  <p>I can't do this:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>class Test {
  //data attributes
  public:
     static Date operator+(Date&amp; lhs, Date&amp; rhs) {
          //implementation code
      }
  }
  </code></pre>
  
  <p>Because if I do that I get an error: <code>Overloaded 'operator+' cannot be a static member function</code>.</p>
  
  <p>So is this an error or I misinterpreted it?</p>
  
  <p>Thanks in advance.</p>