title: Object has type qualifiers that prevent match (function overload not found)
body: <p>I have a simple class, intended to convert integers to byte arrays.</p>
  
  <pre><code>class mc_int {
      private: 
          int val;      //actual int
      public: 
          int value();  //Returns value
          int value(int);  //Changes and returns value
          mc_int();  //Default constructor
          mc_int(int);//Create from int
          void asBytes(char*); //generate byte array
  
          mc_int&amp; operator=(int);
          mc_int&amp; operator=(const mc_int&amp;);
  
          bool endianity;  //true for little
  };
  </code></pre>
  
  <p>For conversion and simpler usage, I decided to add <code>operator=</code> methods. But I think my implementation of <code>mc_int&amp; operator=(const mc_int&amp;);</code> is incorrect.</p>
  
  <pre><code>mc_int&amp; mc_int::operator=(const mc_int&amp; other) {
              val = other.value();  
              //    |--------&gt;Error: No instance of overloaded function matches the argument list and object (object has type quelifiers that prevent the match)
  }
  </code></pre>
  
  <p>What could this be? I tried to use <code>other-&gt;value()</code>, but that was wrong too.</p>