title: How to use implicit type conversion with member functions?
body: <p>Let us consider the following examples of where <strong>implicit type conversion</strong> <em>works</em> and where it <em>doesn't</em>:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  
  struct Thingy
  {
      void write()
      {
          std::cout &lt;&lt; "x" &lt;&lt; std::endl;
      }
  };
  
  struct Node
  {
      Thingy a;
      int data;
      operator Thingy&amp;(){return a;}
  };
  
  void f(Thingy thingy)
  {
      thingy.write();
  }
  
  template &lt;typename TIterator&gt;
  void f (TIterator begin, TIterator end)
  {
      for (TIterator it = begin; it != end; ++it)
          it-&gt;write();
  }
  
  int main()
  {
      std::vector&lt;Node&gt; vector(10);
  
      f(vector.begin(), vector.end());  // Doesn't compile
      f(vector[3]);                     // compiles
      vector[3].write();                // Doesn't compile
      return 0;
  }
  </code></pre>
  
  <p>Why is this so? The </p>
  
  <pre><code>void Node::write(); 
  </code></pre>
  
  <p>Should not be fundamentally different from:</p>
  
  <pre><code>void write(Node* this);
  </code></pre>
  
  <p><strong>Is there any way to make my example code compile and run?</strong></p>
  
  <p>EDIT:</p>
  
  <p>I understand the mechanics of why it doesn't work, I want to understand the philosophy. Why did the C++ Standard committee think it was a bad Idea?</p>