title: Compilation error when accessing overloaded operator of managed reference property
body: <p>I get the compilation error</p>
  
  <blockquote>
    <p>test.cpp(21) : error C2676: binary '+' : 'Manager ^' does not define
    this operator or a conversion to a type acceptable to the predefined
    operator</p>
  </blockquote>
  
  <p>when trying to compile the following program.</p>
  
  <pre><code>public ref class Managed {};
  
  public ref class Manager {
      public:
          Manager^ operator += (Managed^ m) { list-&gt;Add(m); return this; }
      private:
           System::Collections::Generic::List&lt;Managed^&gt;^ list;
  };
  
  public ref class Foo {
      public:
          property ::Manager^ Manager {
              ::Manager^ get() { return manager; }
          }
      private:
          ::Manager^ manager;
  };
  
  int main() {
      Foo^ foo = gcnew Foo;
      foo-&gt;Manager += gcnew Managed;  // Line 21
  }
  </code></pre>
  
  <p>When I replace the <code>main</code> function with the one below, the program compiles.</p>
  
  <pre><code>int main() {
      Foo^ foo = gcnew Foo;
      Manager^ mgr = foo-&gt;Manager;
      mgr += gcnew Managed;
  }
  </code></pre>
  
  <p>What is the essential difference between the two, that makes the one compile but not the other one?</p>