Benefit of Initialization List - Avoiding calls to default constructors
<p>I was reading effective C++ and I couldn't really understand one of the mentioned benefit of initialization list.From what I understand is that initialization lists also help to avoid calling of unnecessary default constructors especially when they are not needed. So in order to test that I created a simple code example as such</p>

<pre><code>class base
{
public:

    base()
    {
        std::cout &lt;&lt; "Default Constructor called \n";
    }
    base (int i)
    {
        std::cout &lt;&lt; "Int constructor called \n";
    }
};

class der : public base
{
private:
    base b;
public:
    der(int i):b(i)
    {
        std::cout &lt;&lt; "Derived constructor called \n";
    }
};

void main()
{
    der d(12);
}
</code></pre>

<p>No where I assumed that only the int constructor will be called instead both the constructors of the base class are called. Could anyone please clarify this concept.</p>
