This is the mail archive of the gcc-bugs@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]

[Bug c++/28169] Tertiary operator: object creation and initialization



------- 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


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