http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51706

Daniel Krügler <daniel.kruegler at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.kruegler at
                   |                            |googlemail dot com

--- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> 
2012-01-15 12:46:47 UTC ---
(In reply to comment #0)
> If a move constructor is defined, then the copy assignment operator is 
> deleted,
> even if a copy constructor is defined.
> 
> In the n3092 draft, it is:
> 12.8 "Copying and moving class objects" [class.copy], paragraphs 20,25
> which doesn't say move constructors should affect copy assignment.

Note that n3092 is outdated, the last C++11 draft was n3290 and I'm referring
to it in the following.

The compiler is correct to declare the copy assignment operator as deleted in
this case, see [class.copy] p18:

"If the class definition does not explicitly declare a copy assignment
operator, one is declared implicitly. If the class definition declares a move
constructor or move assignment operator, the implicitly declared copy
assignment operator is defined as deleted; [..]"

I suggest to close this bug as INVALID.

Reply via email to