strange behavior of initialization in C++
<p>I have two classes <code>Base</code> and <code>Derived</code> from it:</p>

<pre><code>class Base{
public:
    Base(int = 0);
    Base(Base&amp;);
    Base&amp; operator=(const Base&amp;);
protected:
    int protectedData;
private:
    int baseData;
};

/////////////DERIVED CLASS
class Derived: public Base{
public:
    Derived(int = 0);
    Derived(Derived&amp;);
    Derived(Base&amp;);
    Derived&amp; operator=(const Derived&amp;);
private:
    int derivedData;
};
</code></pre>

<h3>implementation of the functions</h3>

<pre><code>///////////BASE FUNCTIONS
Base::Base(int value): protectedData(value), baseData(value)
{
    cout &lt;&lt; "base C'tor" &lt;&lt; endl;
}


Base::Base(Base&amp; base)
{
    baseData = base.baseData;
    protectedData = base.protectedData;
    cout &lt;&lt; "base Copy C'tor" &lt;&lt; endl;
}

Base&amp; Base::operator=(const Base&amp; base)
{
    if(this == &amp;base) return *this;
    baseData = base.baseData;
    protectedData = base.protectedData;
    cout &lt;&lt; "Base::operator=" &lt;&lt; endl;
    return *this;
}

///////////DERIVED FUNCTIONS

Derived::Derived(int value): Base(value), derivedData(value)
{
    cout &lt;&lt; "derived C'tor" &lt;&lt; endl;
}

Derived::Derived(Derived&amp; derived)
    : Base(derived)
{
    derivedData = derived.derivedData;
    cout &lt;&lt; "derived Copy C'tor" &lt;&lt; endl;
}

Derived::Derived(Base&amp; base)
    : Base(base), derivedData(0)
{
    cout &lt;&lt; " Derived(Base&amp;) is called " &lt;&lt; endl;
}

Derived&amp; Derived::operator=(const Derived&amp; derived)
{
    if(this == &amp;derived) return *this;

    derivedData = derived.derivedData;
    cout &lt;&lt; "Derived::operator=" &lt;&lt; endl;
    return *this;
}
</code></pre>

<p>With the following in my main:</p>

<pre><code>Base base(1);
Derived derived1 = base;
</code></pre>

<p>the compiler gives me an error:</p>

<pre><code>..\main.cpp:16: error: no matching function for call to `Derived::Derived(Derived)'
..\base.h:34: note: candidates are: Derived::Derived(Base&amp;)
..\base.h:33: note:                 Derived::Derived(Derived&amp;)
..\base.h:32: note:                 Derived::Derived(int)
..\main.cpp:16: error:   initializing temporary from result of `Derived::Derived(Base&amp;)'
</code></pre>

<p>but when I have this in main:</p>

<pre><code>Base base(1);
Derived derived1(base);
</code></pre>

<p>it works perfectly. Why?</p>

<h3>EDITED</h3>

<p>so ok thanks for everybody, I checked it with const and all works good, <code>BUT</code> I check also all calls and in both cases I receive:</p>

<pre><code>base C'tor
base Copy C'tor
Derived(Base&amp;)
</code></pre>

<p>my question is, why? You said that I actually call:
<code>Derived(Derived(Base&amp;))</code> so I must have</p>

<pre><code>base C'tor
base Copy C'tor
Derived(Base&amp;)
Derived copy c'tor //&lt;-note, why this one is missing?
</code></pre>
