This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: c++/5937: g++ 3.0.2 does not allow return of class constructor


Synopsis: g++ 3.0.2 does not allow return of class constructor

State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Thu Apr 25 06:46:18 2002
State-Changed-Why:
    Not a bug. 
    	return X(d)
    uses the X::X(int) ctor to create a temporary, and then
    requires a copy constructor to copy that temporary
    into the return slot. See [6.6.3]/2 and [12.2]. Now, we
    can (and do) eliminate that temporary, as allowed by
    [12.8]/15, but that is an optimization and the copy
    ctor must still be accessible.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5937


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]