C++ Why is the converter constructor implicitly called?
<p>Why is the Child class's converter constructor called in the code below?</p>

<p>I mean, it automatically converts Base to Child via the Child converter constructor. The code below compiles, but shouldn't it <em>not</em> compile since I haven't provided <code>bool Child::operator!=(Base const&amp;)</code>?</p>

<pre><code>class Base
{
};

class Child : public Base
{
public:
  Child() {}
  Child(Base const&amp; base_) :
    Base(base_)
  {
    std::cout &lt;&lt;"should never called!";
  }
  bool operator!=(Child const&amp;)
  {
    return true;
  }
};

void main()
{
  Base  base;
  Child child;

  if(child != base)
    std::cout &lt;&lt; "not equal";
  else
    std::cout &lt;&lt; "equal";
}
</code></pre>
