Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The implicit generation of move constructors and assignment operators has been contentious and there have been major revisions in recent drafts of the C++ Standard, so currently available compilers will likely behave differently with respect to implicit generation.</p> <p>For more about the history of the issue, see <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/" rel="noreferrer">the 2010 WG21 papers list</a> and search for "mov"</p> <p>The current specification (N3225, from November) states (N3225 12.8/8):</p> <blockquote> <p>If the definition of a class <code>X</code> does not explicitly declare a move constructor, one will be implicitly declared as defaulted if and only if </p> <ul> <li><p><code>X</code> does not have a user-declared copy constructor, and </p></li> <li><p><code>X</code> does not have a user-declared copy assignment operator, </p></li> <li><p><code>X</code> does not have a user-declared move assignment operator, </p></li> <li><p><code>X</code> does not have a user-declared destructor, and </p></li> <li><p>the move constructor would not be implicitly defined as deleted. </p></li> </ul> </blockquote> <p>There is similar language in 12.8/22 specifying when the move assignment operator is implicitly declared as defaulted. You can find the complete list of changes made to support the current specification of implicit move generation in <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3203.htm" rel="noreferrer">N3203: Tightening the conditions for generating implicit moves </a>, which was based largely on one of the resolutions proposed by Bjarne Stroustrup's paper <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3201.pdf" rel="noreferrer">N3201: Moving right along</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload