[Bug c++/61655] Copy constructor not called on CRTP schema

2014-06-30 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61655 --- Comment #4 from Marc Glisse --- Look up "copy elision" (the wikipedia article will do).

[Bug c++/61655] Copy constructor not called on CRTP schema

2014-06-30 Thread fabien.picarou...@univ-nantes.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61655 --- Comment #3 from Fabien Picarougne --- This code is minimal and is just here to illustrate the problem, I use a more complex one to handle generic matrix. But The copy constructor here is not neutral, there is an output on stdout. So I think,

[Bug c++/61655] Copy constructor not called on CRTP schema

2014-06-30 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61655 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/61655] Copy constructor not called on CRTP schema

2014-06-30 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61655 --- Comment #1 from Marc Glisse --- Try -fno-elide-constructors. Why would you want a copy? Is it because of the parentheses in the return statement that you expect elision not to be performed?