<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-15">
<title>Removing Implicit Move Constructors and Move Assignment Operators</title>
<style type="text/css">
ins, .inserted
{
    color: black;
    background: #a0ffa0;
    text-decoration: underline;
}
del, .deleted
{
    color: black;
    background: #ffa0a0;
    text-decoration: line-through;
}
.standardtext
{
    margin-left: 2em;
}
</style>
</head>

<body>
<table>
<tr><td>Date:</td><td>2010-11-12</td></tr>
<tr><td>Author:</td><td><a href="mailto:anthony@justsoftwaresolutions.co.uk">Anthony
      Williams</a><br>Just Software Solutions Ltd</td></tr>
<tr><td>Revised by:</td><td>Jason Merrill</td></tr>
<tr><td>Document Number<td>N3216=10-0206</td></tr>
<tr><td>Revision</td><td>3</td></tr>
</table>

<h1>Removing Implicit Move Constructors and Move Assignment Operators</h1>

<h2>Proposed Wording Changes</h2>

<p>These changes are against N3126.</p>

<h3>12.8 Copying and moving class objects [class.copy]</h3>

Paragraphs 10/11:

<blockquote>
<del>If the class definition does not explicitly declare a move constructor, one
will be implicitly declared as defaulted if and only if</del>
<ul>
<li><del>X does not have a user-declared copy constructor and</del></li>
<li><del>the move constructor would not be implicitly defined as deleted.</del></li>
</ul>
<del>[ Note: When the move constructor is not implicitly declared or
explicitly supplied, expressions that otherwise would have invoked the move
constructor may instead invoke a copy constructor. &mdash; end note ]</del>
<p/><ins>A move constructor is never implicitly declared, but can be
explicitly defaulted; for the purpose of comparison to such an explicit
declaration (8.4.2), the notional</ins><del>The</del> implicitly-declared move
constructor for class X <del>will</del><ins>is considered to</ins> have the
form
<pre>
  X::X(X&&)
</pre>
</blockquote>

<p>Alter the first sentence of paragraph 12 as follows:</p>

<div class="standardtext">
  An implicitly-declared copy<del>/move</del> constructor is an inline public member of its class. 
</div>

<p>Delete paragraph 22.</p>

<blockquote>
<del>If the class definition does not explicitly declare a move assignment
  operator</del> ...
<p/>...

<p/><del>&mdash; end example ]</del>
</blockquote>


<p>Paragraph 23:</p>

<blockquote>
<ins>A move assignment operator is never implicitly declared, but can be
explicitly defaulted; for the purpose of comparison to such an explicit
declaration (8.4.2), the notional</ins><del>The</del> implicitly-declared move
assignment operator for a class X <del>will</del><ins>is considered
to</ins> have the form
<pre>
  <ins>X</ins>& X::operator=(X&&);
</pre>
</blockquote>

<p>Alter the first two sentences of paragraph 24 as follows:</p>

<div class="standardtext">
<del>The implicitly-declared</del><ins>A defaulted</ins> copy/move assignment operator for
class <code>X</code> has the return type <code>X&amp;</code>; it
returns the object for which the assignment operator is invoked, that
is, the object assigned to. An implicitly-declared
copy<del>/move</del> assignment operator is an inline public member of
its class. ...
</div>

<p>Alter paragraph 26 as follows:</p>

<div class="standardtext">
  Because a copy<del>/move</del> assignment operator is implicitly
  declared for a class if not declared by the user, a base class
  copy<del>/move</del> assignment operator is always hidden by the
  corresponding assignment operator of a derived class (13.5.3). A
  using-declaration (7.3.3) that brings in from a base class an
  assignment operator with a parameter type that could be that of a
  copy<del>/move</del> assignment operator for the derived class is not
  considered an explicit declaration of such an operator and does not suppress the
  implicit declaration of the derived class operator; the operator
  introduced by the using-declaration is hidden by the
  implicitly-declared operator in the derived class.
</div>

</body> </html>
