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++/62227] Templated move not elided


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.


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