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++/46246] [C++0x] Move constructor required when passing a temporary by copy, but not actually used


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?


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