Rolf Magnus wrote:
shuisheng wrote:
>Dear All,
I am wondering how the default copy constructor of a derived class
looks like.
There is no "default copy constructor". You probably mean the
compiler-generated copy constructor.
May I ask what the benefit of such linguistic purity is? Also, I think, the
term "compiler-generated copy constructor" is not better supported by the
standard than the term "default copy constructor". For starters, there is
no requirement that the implementation be a compiler. Thus, at best there
is a "copy constructor with predefined behavior (given by the standard)
that will be generated by the implementation unless there is a
user-declared copy constructor". I think, this copy constructor can
justifiedly be referred to as a "default copy constructor" since it is
present unless the user overrides the default behavior by declaring a copy
constructor to replace it. Also note that the standard does not define the
term "default copy constructor" for any other meaning. So using it within
the C++ community as a name for the copy constructor with predefined
behavior (given by the standard) that will be generated by the
implementation unless there is a user-declared copy constructor will not
create any ambiguity.
Best
Kai-Uwe Bux