[Bug c++/28169] Tertiary operator: object creation and initialization
joseph dot rajesh at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Jun 27 05:49:00 GMT 2006
------- Comment #3 from joseph dot rajesh at gmail dot com 2006-06-27 04:09 -------
No I haven't missed the copy constructor... I checked the working with copy
constructor also...
I know g++ is doing a conversion and making a copy of type "Base" (Using Base
copy constructor)... that's why the final object is of type "Base" and the
temporary "Derived" class object is thus deleted... And the standard says that
a copy should not be made instead of it should refer the original object.
Because finaly I should get a Base class reference to the derived class object,
which is not happening in g++...
--
joseph dot rajesh at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |joseph dot rajesh at gmail
| |dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28169
More information about the Gcc-bugs
mailing list