title: Implement conversion operator for pointer
body: <p>The question is simple but i can't find a solution.</p>
  
  <pre><code>class foo
  {
  public:
      operator int()
      {
          return 5;
      }
  };
  
  foo* a = new foo();   
  int b = a;
  </code></pre>
  
  <p>Is it possible to implement that behavior?</p>