Except in cases where the compiler can elide the copy constructor invocation, by passing by value, you invoke the copy constructor. Do you understand this?Quote:
Originally Posted by Eman
Therefore, if you have a copy constructor that takes its argument by value, then before you can even get started with the copy constructor, it must invoke itself to perform a copy. But this secondary invocation cannot get started without invoking itself to perform a copy, etc.
In my example, you say that I "induced" the recursion with the call to foo in the body of the copy constructor. In your case, you "induce" the recursion with an implied call to the copy constructor in the parameter list of the copy constructor.