This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/62227] Templated move not elided
- From: "james.dennett at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 24 Aug 2014 21:31:52 +0000
- Subject: [Bug c++/62227] Templated move not elided
- Auto-submitted: auto-generated
- References: <bug-62227-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62227
James Dennett <james.dennett at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |james.dennett at gmail dot com
--- Comment #2 from James Dennett <james.dennett at gmail dot com> ---
> A template cannot be a move constructor
I'm with you so far.
> and so it is not legal to elide it.
I don't think that's the case (or at least, I'm not aware of any wording saying
so). C++98 effectively said so, but C++03/11/14 don't, AFAICS. Elision
applies to copying/moving, not just to copy/move constructors, and a template
can be used for copying or moving.
The standard isn't very clear on this though.