c++/10245: [3.3/3.4 regression] ?: operator requires public copy constructor of return type

Wolfgang Bangerth bangerth@ices.utexas.edu
Thu Mar 27 18:16:00 GMT 2003


The following reply was made to PR c++/10245; it has been noted by GNATS.

From: Wolfgang Bangerth <bangerth@ices.utexas.edu>
To: Andreas Schwab <schwab@suse.de>
Cc: gcc-bugs@gcc.gnu.org, <harri.pasanen@trema.com>,
   <jean-paul_marinier@hp.com>, <tot@trema.com>, <gcc-gnats@gcc.gnu.org>
Subject: Re: c++/10245: [3.3/3.4 regression] ?: operator requires public copy
 constructor of return type
Date: Thu, 27 Mar 2003 11:55:29 -0600 (CST)

 > |>     Apparently it wants to make a copy of the return arguments.
 > |>     Since at least in Standard C++ (not in Gnu C++) ?: returns
 > |>     an rvalue, I don't think this is necessary.
 > 
 > ?: returns an lvalue if both expressions have the same type.
 
 Sorry for the confusion, you are of course right. It shouldn't change the 
 outcome, though. I still think this behavior is in error.
 
 W.
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth             email:            bangerth@ticam.utexas.edu
                               www: http://www.ticam.utexas.edu/~bangerth/
 
 



More information about the Gcc-prs mailing list