This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/28169] Tertiary operator: object creation and initialization
- From: "joseph dot rajesh at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jun 2006 04:09:17 -0000
- Subject: [Bug c++/28169] Tertiary operator: object creation and initialization
- References: <bug-28169-12730@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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