title: Why can't I const_cast the return of the conversion operator?
body: <p>I've got a conversion operator that returns a const pointer, and I need to const_cast it. However, that doesn't work, at least under MSVC8. The following code reproduces my problem:</p>
  
  <pre><code>class MyClass {
  public:
      operator const int* () {
          return 0;
      }
  };
  
  int main() {
      MyClass obj;
      int* myPtr;
      // compiles
      const int* myConstPtr = obj;
      // compiles
      myPtr = const_cast&lt;int*&gt;(myConstPtr);
      // doesn't compile (C2440: 'const_cast' : cannot convert from 'MyClass' to 'int *')
      myPtr = const_cast&lt;int*&gt;(obj);
  }
  </code></pre>
  
  <p>Why is that? It seems counter-intuitive. Thanks!</p>