c++/6340: copy constructor vs non-default constructor
nathan@gcc.gnu.org
nathan@gcc.gnu.org
Thu Apr 18 02:46:00 GMT 2002
Synopsis: copy constructor vs non-default constructor
State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Thu Apr 18 00:58:37 2002
State-Changed-Why:
not a bug.
Thing2 b = a;
is formally
Thing2 b(Thing2 (a));
i.e. convert a to Thing2 then copy construct b with
that. [8.5]/14 class copy initialization case.
But we are allowed to elide that temporary Thing2.
See [12.8]/15 of the std. The copy ctor must
exist and be accessible though.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6340
More information about the Gcc-bugs
mailing list