Copy constructor revisited
Robert Schweikert
Robert.Schweikert@abaqus.com
Thu Apr 22 18:19:00 GMT 2004
On Thu, 2004-04-22 at 11:30, Nathan Sidwell wrote:
> Robert Schweikert wrote:
> > I have another question about the copy ctor accessibility requirement
> > and the changes in 3.4.
> >
> > I pretty much understand the requirements and interpretation of the
> > Standard w.r.t. private copy ctor usage. As it pertains to the example
> > on http://gcc.gnu.org/gcc-3.4/changes.html
> >
> > However, what happens with a protected copy ctor and access of that ctor
> > by its derived class?
>
> > B can access the copy ctor of A since it is protected and not private
> > and B is a derived class of A.
> Only for those A's that are bases of the B' member's this pointer.
Say what?
>
> > Yet trying to compile this code yields an
> > error:
> because it is for a copy of not-a-base-of-a-B
Don't get this either.
Nathan,
Could you please be more explicit in your explanation? I appreciate the
answer, unfortunately I am completely lost trying to understand what it
means.
Thanks,
Robert
>
> nathan
--
Robert Schweikert <Robert.Schweikert@abaqus.com>
ABAQUS
More information about the Gcc
mailing list