class Foo { }; Foo f; Foo g = f; // (*)
My question is, what is being called in the line marked with (*) ? Is it the default
Foo g = f; // (*)
copy constructor gets invoked .Its called copy initialization of object.
If you have not written copy constructor within class Foo then compiler generated copy constructor gets called.