This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/55098] c++11: move constructor doesn't run at all (but with a hammer)
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 27 Oct 2012 15:54:21 +0000
- Subject: [Bug c++/55098] c++11: move constructor doesn't run at all (but with a hammer)
- Auto-submitted: auto-generated
- References: <bug-55098-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55098
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-10-27 15:54:21 UTC ---
(In reply to comment #4)
> My opinion is to disable elide-constructors in -sdt=c++11.
This is nothing new in C++11, the same applies to copy constructors in C++98,
and changing it would make a huge number of programs run slower. Copy elision
is a Good Thing. This has been discussed several times in several places and
isn't going to change.
> Programers in this standard use own move-constructors with own-side effects.
No they don't, not if they understand C++.
Don't rely on side effects in copy/move constructors.