[Bug c++/67773] destructor called on temp object before and named object after move, while not being called on named object before move
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Sep 30 09:21:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67773
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Oh, are you expecting this:
a_thing = demo(demo::second);
to have the same behaviour as this:
a_thing.~demo();
new(&a_thing) demo(demo::second);
?
That's not how C++ works.
More information about the Gcc-bugs
mailing list