This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/61655] Copy constructor not called on CRTP schema
- From: "pinskia at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 30 Jun 2014 07:49:48 +0000
- Subject: [Bug c++/61655] Copy constructor not called on CRTP schema
- Auto-submitted: auto-generated
- References: <bug-61655-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61655
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The copy constructor does not need to be called if there is no copying going
on. There is two optimizations going on here. The first is the named return
value optimization. The second is related to that in the intilization of the
new variable is handled inside the function itself.