<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW " title="NEW --- - Implement CWG 1579: Return by converting move constructor" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23849&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=1NNWwgQVqwx59PJyAvrQ5AMGm79TKCzAuMX92YddbSQ&s=3Iu2rZWBGEzn-DJXu-pllyDw1Yxw21CU9OdMBzlpAPc&e=">23849</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Implement CWG 1579: Return by converting move constructor
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++14
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>howard.hinnant@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>New rules for implicit move on return for C++14:

<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.open-2Dstd.org_jtc1_sc22_wg21_docs_cwg-5Fdefects.html-231579&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=1NNWwgQVqwx59PJyAvrQ5AMGm79TKCzAuMX92YddbSQ&s=82UdjGJ31e1j3ToP63EZkLEM4_ns6ggY2F3CEpUX2PM&e=">http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1579</a>

Here is a test to detect if the rules are implemented.  This should not compile
in C++11 and should compile in C++14:

struct X
{
    X() = default;
    X(X&&) = default;
};

struct Y
{
    Y() = default;
    Y(Y&&) = default;
    Y(X&&) {}
};

Y
test()
{
    X x;
    return x;
}

int
main()
{
    auto y = test();
}</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>