[Bug c++/46246] [C++0x] Move constructor required when passing a temporary by copy, but not actually used

a.pignotti at sssup dot it gcc-bugzilla@gcc.gnu.org
Sat Oct 30 16:31:00 GMT 2010


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46246

--- Comment #2 from Alessandro Pignotti <a.pignotti at sssup dot it> 2010-10-30 16:31:27 UTC ---
The secondo attachment compiles, but the move constructor seems not really
used. The output is:

default bar
foo called

Moreover i was expecting a call to the copy constructor but that was elided, is
this an optimization or something mandated by the standard?



More information about the Gcc-bugs mailing list