<!DOCTYPE html>
    <html>
    <head>
        <meta http-equiv="Content-type" content="text/html;charset=UTF-8">
        <style>
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ body { font-family: "Segoe WPC", "Segoe UI", "SFUIText-Light", "HelveticaNeue-Light", sans-serif, "Droid Sans Fallback"; font-size: 14px; padding: 0 12px; line-height: 22px; word-wrap: break-word; } body.scrollBeyondLastLine { margin-bottom: calc(100vh - 22px); } body.showEditorSelection .code-line { position: relative; } body.showEditorSelection .code-active-line:before, body.showEditorSelection .code-line:hover:before { content: ""; display: block; position: absolute; top: 0; left: -12px; height: 100%; } body.showEditorSelection li.code-active-line:before, body.showEditorSelection li.code-line:hover:before { left: -30px; } .vscode-light.showEditorSelection .code-active-line:before { border-left: 3px solid rgba(0, 0, 0, 0.15); } .vscode-light.showEditorSelection .code-line:hover:before { border-left: 3px solid rgba(0, 0, 0, 0.40); } .vscode-dark.showEditorSelection .code-active-line:before { border-left: 3px solid rgba(255, 255, 255, 0.4); } .vscode-dark.showEditorSelection .code-line:hover:before { border-left: 3px solid rgba(255, 255, 255, 0.60); } .vscode-high-contrast.showEditorSelection .code-active-line:before { border-left: 3px solid rgba(255, 160, 0, 0.7); } .vscode-high-contrast.showEditorSelection .code-line:hover:before { border-left: 3px solid rgba(255, 160, 0, 1); } img { max-width: 100%; max-height: 100%; } a { color: #4080D0; text-decoration: none; } a:focus, input:focus, select:focus, textarea:focus { outline: 1px solid -webkit-focus-ring-color; outline-offset: -1px; } hr { border: 0; height: 2px; border-bottom: 2px solid; } h1 { padding-bottom: 0.3em; line-height: 1.2; border-bottom-width: 1px; border-bottom-style: solid; } h1, h2, h3 { font-weight: normal; } h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { font-size: inherit; line-height: auto; } a:hover { color: #4080D0; text-decoration: underline; } table { border-collapse: collapse; } table > thead > tr > th { text-align: left; border-bottom: 1px solid; } table > thead > tr > th, table > thead > tr > td, table > tbody > tr > th, table > tbody > tr > td { padding: 5px 10px; } table > tbody > tr + tr > td { border-top: 1px solid; } blockquote { margin: 0 7px 0 5px; padding: 0 16px 0 10px; border-left: 5px solid; } code { font-family: Menlo, Monaco, Consolas, "Droid Sans Mono", "Courier New", monospace, "Droid Sans Fallback"; font-size: 14px; line-height: 19px; } body.wordWrap pre { white-space: pre-wrap; } .mac code { font-size: 12px; line-height: 18px; } code > div { padding: 16px; border-radius: 3px; overflow: auto; } /** Theming */ .vscode-light { color: rgb(30, 30, 30); } .vscode-dark { color: #DDD; } .vscode-high-contrast { color: white; } .vscode-light code { color: #A31515; } .vscode-dark code { color: #D7BA7D; } .vscode-light code > div { background-color: rgba(220, 220, 220, 0.4); } .vscode-dark code > div { background-color: rgba(10, 10, 10, 0.4); } .vscode-high-contrast code > div { background-color: rgb(0, 0, 0); } .vscode-high-contrast h1 { border-color: rgb(0, 0, 0); } .vscode-light table > thead > tr > th { border-color: rgba(0, 0, 0, 0.69); } .vscode-dark table > thead > tr > th { border-color: rgba(255, 255, 255, 0.69); } .vscode-light h1, .vscode-light hr, .vscode-light table > tbody > tr + tr > td { border-color: rgba(0, 0, 0, 0.18); } .vscode-dark h1, .vscode-dark hr, .vscode-dark table > tbody > tr + tr > td { border-color: rgba(255, 255, 255, 0.18); } .vscode-light blockquote, .vscode-dark blockquote { background: rgba(127, 127, 127, 0.1); border-color: rgba(0, 122, 204, 0.5); } .vscode-high-contrast blockquote { background: transparent; border-color: #fff; }
</style>
<style>
/* Tomorrow Theme */ /* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ /* Original theme - https://github.com/chriskempson/tomorrow-theme */ /* Tomorrow Comment */ .hljs-comment, .hljs-quote { color: #8e908c; } /* Tomorrow Red */ .hljs-variable, .hljs-template-variable, .hljs-tag, .hljs-name, .hljs-selector-id, .hljs-selector-class, .hljs-regexp, .hljs-deletion { color: #c82829; } /* Tomorrow Orange */ .hljs-number, .hljs-built_in, .hljs-builtin-name, .hljs-literal, .hljs-type, .hljs-params, .hljs-meta, .hljs-link { color: #f5871f; } /* Tomorrow Yellow */ .hljs-attribute { color: #eab700; } /* Tomorrow Green */ .hljs-string, .hljs-symbol, .hljs-bullet, .hljs-addition { color: #718c00; } /* Tomorrow Blue */ .hljs-title, .hljs-section { color: #4271ae; } /* Tomorrow Purple */ .hljs-keyword, .hljs-selector-tag { color: #8959a8; } .hljs { display: block; overflow-x: auto; color: #4d4d4c; padding: 0.5em; } .hljs-emphasis { font-style: italic; } .hljs-strong { font-weight: bold; }
</style>
<style>
ul.contains-task-list { padding-left: 0; } ul ul.contains-task-list { padding-left: 40px; } .task-list-item { list-style-type: none; } .task-list-item-checkbox { vertical-align: middle; }
</style>
        <style>
            body {
                font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', 'HelveticaNeue-Light', 'Ubuntu', 'Droid Sans', sans-serif;
                font-size: 14px;
                line-height: 1.6;
            }
        </style>
    </head>
    <body>
        <style type="text/css">
p {text-align:justify}
li {text-align:justify}
blockquote.note
{
background-color:#E0E0E0;
padding-left: 15px;
padding-right: 15px;
padding-top: 1px;
padding-bottom: 1px;
}
ins {background-color:#A0FFA0}
del {background-color:#FFA0A0}
table {border-collapse: collapse;}
table, th, td {
border: 1px solid black;
border-collapse: collapse;
} 
</style>
<table>
<thead>
<tr>
<th>Document Number:</th>
<th>P0911R1</th>
</tr>
</thead>
<tbody>
<tr>
<td>Date:</td>
<td>2018-03-15</td>
</tr>
<tr>
<td>Project:</td>
<td>Programming Language C++, CWG, LWG</td>
</tr>
<tr>
<td>Revises:</td>
<td>P0911R0</td>
</tr>
<tr>
<td>Reply to:</td>
<td>gorn@microsoft.com</td>
</tr>
</tbody>
</table>
<h1 id="rebase-the-coroutines-ts-onto-the-c17-standard">Rebase the Coroutines TS onto the C++17 Standard</h1>
<h2 id="introduction">Introduction</h2>
<p>The current working draft for the Coroutines TS is based on C++14. This paper proposes revising the draft to reflect the new standard.</p>
<h2 id="wording-updates">Wording updates</h2>
<h3 id="clause-renumbering">Clause renumbering</h3>
<p>Due to new ISO guidelines, C++17 has changed the numbers of nearly all the clauses relative to C++14. In Coroutines TS replace all clause numbers and references to stable names from C++14 based to C++17 based as follows:</p>
<table>
<thead>
<tr>
<th>Stable Name</th>
<th>C++14 based numbering</th>
<th>C++17 based numbering</th>
</tr>
</thead>
<tbody>
<tr>
<td>atomics</td>
<td>29</td>
<td>32</td>
</tr>
<tr>
<td>basic</td>
<td>3</td>
<td>6</td>
</tr>
<tr>
<td>basic.link</td>
<td>3.5</td>
<td>6.5</td>
</tr>
<tr>
<td>basic.lookup.classref</td>
<td>3.4.5</td>
<td>6.4.5</td>
</tr>
<tr>
<td>basic.start.main</td>
<td>3.6.1</td>
<td>6.6.1</td>
</tr>
<tr>
<td>basic.stc.auto</td>
<td>3.7.3</td>
<td>6.7.3</td>
</tr>
<tr>
<td>basic.stc.dynamic</td>
<td>3.7.4</td>
<td>6.7.4</td>
</tr>
<tr>
<td>basic.stc.dynamic.allocation</td>
<td>3.7.4.1</td>
<td>6.7.4.1</td>
</tr>
<tr>
<td>basic.stc.dynamic.deallocation</td>
<td>3.7.4.2</td>
<td>6.7.4.2</td>
</tr>
<tr>
<td>basic.stc.static</td>
<td>3.7.1</td>
<td>6.7.1</td>
</tr>
<tr>
<td>basic.stc.thread</td>
<td>3.7.2</td>
<td>6.7.2</td>
</tr>
<tr>
<td>basic.types</td>
<td>3.9</td>
<td>6.9</td>
</tr>
<tr>
<td>class</td>
<td>9</td>
<td>12</td>
</tr>
<tr>
<td>class.access</td>
<td>11</td>
<td>14</td>
</tr>
<tr>
<td>class.copy</td>
<td>12.8</td>
<td>15.8</td>
</tr>
<tr>
<td>class.derived</td>
<td>10</td>
<td>13</td>
</tr>
<tr>
<td>class.virtual</td>
<td>10.3</td>
<td>13.3</td>
</tr>
<tr>
<td>compliance</td>
<td>17.6.1.3</td>
<td>20.5.1.3</td>
</tr>
<tr>
<td>conv</td>
<td>4</td>
<td>7</td>
</tr>
<tr>
<td>coroutine.handle</td>
<td>18.11.2</td>
<td>21.11.2</td>
</tr>
<tr>
<td>coroutine.handle.compare</td>
<td>18.11.2.6</td>
<td>21.11.2.6</td>
</tr>
<tr>
<td>coroutine.handle.con</td>
<td>18.11.2.1</td>
<td>21.11.2.1</td>
</tr>
<tr>
<td>coroutine.handle.export.import</td>
<td>18.11.2.2</td>
<td>21.11.2.2</td>
</tr>
<tr>
<td>coroutine.handle.hash</td>
<td>18.11.2.7</td>
<td>21.11.2.7</td>
</tr>
<tr>
<td>coroutine.handle.observers</td>
<td>18.11.2.3</td>
<td>21.11.2.3</td>
</tr>
<tr>
<td>coroutine.handle.promise</td>
<td>18.11.2.5</td>
<td>21.11.2.5</td>
</tr>
<tr>
<td>coroutine.handle.resumption</td>
<td>18.11.2.4</td>
<td>21.11.2.4</td>
</tr>
<tr>
<td>coroutine.traits</td>
<td>18.11.1</td>
<td>21.11.1</td>
</tr>
<tr>
<td>coroutine.traits.primary</td>
<td>18.11.1.1</td>
<td>21.11.1.1</td>
</tr>
<tr>
<td>coroutine.trivial.awaitables</td>
<td>18.11.3</td>
<td>21.11.3</td>
</tr>
<tr>
<td>cpp</td>
<td>16</td>
<td>19</td>
</tr>
<tr>
<td>cstdint</td>
<td>18.4</td>
<td>21.4</td>
</tr>
<tr>
<td>dcl.constexpr</td>
<td>7.1.5</td>
<td>10.1.5</td>
</tr>
<tr>
<td>dcl.dcl</td>
<td>7</td>
<td>10</td>
</tr>
<tr>
<td>dcl.decl</td>
<td>8</td>
<td>11</td>
</tr>
<tr>
<td>dcl.fct.def</td>
<td>8.4</td>
<td>11.4</td>
</tr>
<tr>
<td>dcl.fct.def.coroutine</td>
<td>8.4.4</td>
<td>11.4.4</td>
</tr>
<tr>
<td>dcl.fct.default</td>
<td>8.3.6</td>
<td>11.4.2</td>
</tr>
<tr>
<td>dcl.spec</td>
<td>7.1</td>
<td>10.1</td>
</tr>
<tr>
<td>dcl.spec.auto</td>
<td>7.1.6.4</td>
<td>10.1.7.4</td>
</tr>
<tr>
<td>except</td>
<td>15</td>
<td>18</td>
</tr>
<tr>
<td>except.throw</td>
<td>15.1</td>
<td>18.1</td>
</tr>
<tr>
<td>expr</td>
<td>5</td>
<td>8</td>
</tr>
<tr>
<td>expr.ass</td>
<td>5.17</td>
<td>8.18</td>
</tr>
<tr>
<td>expr.await</td>
<td>5.3.8</td>
<td>8.3.8</td>
</tr>
<tr>
<td>expr.call</td>
<td>5.2.2</td>
<td>8.2.2</td>
</tr>
<tr>
<td>expr.const</td>
<td>5.19</td>
<td>8.2</td>
</tr>
<tr>
<td>expr.log.or</td>
<td>5.15</td>
<td>8.15</td>
</tr>
<tr>
<td>expr.new</td>
<td>5.3.4</td>
<td>8.3.4</td>
</tr>
<tr>
<td>expr.typeid</td>
<td>5.2.8</td>
<td>8.2.8</td>
</tr>
<tr>
<td>expr.unary</td>
<td>5.3</td>
<td>8.3</td>
</tr>
<tr>
<td>expr.unary.noexcept</td>
<td>5.3.7</td>
<td>8.3.7</td>
</tr>
<tr>
<td>expr.yield</td>
<td>5.20</td>
<td>`8.20</td>
</tr>
<tr>
<td>intro</td>
<td>1</td>
<td>4</td>
</tr>
<tr>
<td>intro.compliance</td>
<td>1.4</td>
<td>4.1</td>
</tr>
<tr>
<td>intro.defs</td>
<td>1.3</td>
<td>3</td>
</tr>
<tr>
<td>intro.execution</td>
<td>1.9</td>
<td>4.6</td>
</tr>
<tr>
<td>language.support</td>
<td>18</td>
<td>21</td>
</tr>
<tr>
<td>lex</td>
<td>2</td>
<td>5</td>
</tr>
<tr>
<td>lex.key</td>
<td>2.12</td>
<td>5.11</td>
</tr>
<tr>
<td>library</td>
<td>17</td>
<td>20</td>
</tr>
<tr>
<td>meta</td>
<td>20.1</td>
<td>23.15</td>
</tr>
<tr>
<td>over</td>
<td>13</td>
<td>16</td>
</tr>
<tr>
<td>over.match</td>
<td>13.3</td>
<td>16.3</td>
</tr>
<tr>
<td>over.match.funcs</td>
<td>13.3.1</td>
<td>16.3.1</td>
</tr>
<tr>
<td>over.match.oper</td>
<td>13.3.1.2</td>
<td>16.3.1.2</td>
</tr>
<tr>
<td>over.oper</td>
<td>13.5</td>
<td>16.5</td>
</tr>
<tr>
<td>special</td>
<td>12</td>
<td>15</td>
</tr>
<tr>
<td>stmt.iter</td>
<td>6.5</td>
<td>9.5</td>
</tr>
<tr>
<td>stmt.jump</td>
<td>6.6</td>
<td>9.6</td>
</tr>
<tr>
<td>stmt.ranged</td>
<td>6.5.4</td>
<td>9.5.4</td>
</tr>
<tr>
<td>stmt.return</td>
<td>6.6.3</td>
<td>9.6.3</td>
</tr>
<tr>
<td>stmt.return.coroutine</td>
<td>6.6.3.1</td>
<td>9.6.3.1</td>
</tr>
<tr>
<td>stmt.stmt</td>
<td>6</td>
<td>9</td>
</tr>
<tr>
<td>support.coroutine</td>
<td>18.11</td>
<td>21.11</td>
</tr>
<tr>
<td>support.dynamic</td>
<td>18.6</td>
<td>21.6</td>
</tr>
<tr>
<td>support.exception</td>
<td>18.8</td>
<td>21.8</td>
</tr>
<tr>
<td>support.general</td>
<td>18.1</td>
<td>21.1</td>
</tr>
<tr>
<td>support.initlist</td>
<td>18.9</td>
<td>21.9</td>
</tr>
<tr>
<td>support.limits</td>
<td>18.3</td>
<td>21.3</td>
</tr>
<tr>
<td>support.rtti</td>
<td>18.7</td>
<td>21.7</td>
</tr>
<tr>
<td>support.runtime</td>
<td>18.1</td>
<td>21.10</td>
</tr>
<tr>
<td>support.start.term</td>
<td>18.5</td>
<td>21.5</td>
</tr>
<tr>
<td>support.types</td>
<td>18.2</td>
<td>21.2</td>
</tr>
<tr>
<td>cpp.headers.freestanding</td>
<td>Table 16</td>
<td>Table 19</td>
</tr>
<tr>
<td>lang.sup.lib.summary</td>
<td>Table 29</td>
<td>Table 32</td>
</tr>
<tr>
<td>temp</td>
<td>14</td>
<td>17</td>
</tr>
<tr>
<td>temp.deduct</td>
<td>14.8.2</td>
<td>17.8.2</td>
</tr>
<tr>
<td>temp.type</td>
<td>14.4</td>
<td>17.4</td>
</tr>
<tr>
<td>unord.hash</td>
<td>20.9.12</td>
<td>23.14.15</td>
</tr>
</tbody>
</table>
<h2 id="1-scope">1. Scope</h2>
<p>Replace reference to ISO/IEC 14882:2014 with ISO/IEC 14882:2017.</p>
<h2 id="2-normative-references">2. Normative References</h2>
<p>Replace reference to ISO/IEC 14882:2014 with ISO/IEC 14882:2017.</p>
<h2 id="3-terms-and-definitions">3. Terms and Definitions</h2>
<p>No changes.</p>
<h2 id="4-general">4. General</h2>
<h3 id="43-program-execution">4.3 Program execution</h3>
<p>Replace references to paragraph 6 to paragraph 7 to match C++17.</p>
<h3 id="44-lexical-conventions-lex">4.4 Lexical conventions [lex]</h3>
<p>Move subclause 4.4 into a subclause 5.11 of clause 5.</p>
<h3 id="45-basic-concepts-basic">4.5 Basic concepts [basic]</h3>
<p>Move subclause 4.5 into a subclause 6.6.1 of clause 6.</p>
<h3 id="46-dynamic-storage-duration-basicstcdynamic">4.6 Dynamic storage duration [basic.stc.dynamic]</h3>
<p>Move subclause 4.6 into a subclause 6.7.4 of clause 6.</p>
<h2 id="5-lexical-conventions-lex">5 Lexical conventions [lex]</h2>
<h3 id="511-keywords-lexkey">5.11 Keywords [lex.key]</h3>
<p>[Editorial note: This is the text moved from section 4.4 of the Coroutines TS with references to clauses, paragraphs and tables updated to match C++17].</p>
<p>In subclause 5.11 of the C++ Standard add the keywords <code>co_await</code>, <code>co_yield</code>, and <code>co_return</code> to Table 5 &quot;Keywords&quot;.</p>
<h2 id="6-basic-concepts-basic">6 Basic Concepts [basic]</h2>
<h3 id="661-main-function">6.6.1 <code>main</code> function</h3>
<p>[Editorial note: This is the text moved from section 4.5 of the Coroutines TS with references to clauses, paragraphs and tables updated to match C++17].</p>
<p>In subclause 6.6.1 of the C++ Standard add underlined text to paragraph 3.</p>
<p>3 The function <code>main</code> shall not be used within a program. The linkage (6.5) of <code>main</code> is implementation-defined. A program that defines <code>main</code> as deleted or that declares <code>main</code> to be <code>inline</code>, <code>static</code>, or <code>constexpr</code> is ill-formed. <ins>The function <code>main</code> shall not be a coroutine (11.4.4)</ins>   ...</p>
<h3 id="674-dynamic-storage-duration-basicstcdynamic">6.7.4 Dynamic Storage Duration [basic.stc.dynamic]</h3>
<p>[Editorial note: This is the text moved from section 4.6 of the Coroutines TS with references to clauses, paragraphs and tables updated to match C++17].</p>
<p>In subclause 6.7.4.1 of the C++ Standard add underlined text to paragraph 4.</p>
<p>4   A global allocation function is only called as the result of a new expression (8.3.4), or called
directly using the function call syntax (8.2.2), <ins>or called indirectly to allocate storage for a coroutine
frame (11.4.4),</ins> ...</p>
<h2 id="7-standard-conversions-conv">7 Standard Conversions [conv]</h2>
<p>No changes are made to Clause 7 of the C++ Standard</p>
<h2 id="8-expressions-expr">8 Expressions [expr]</h2>
<p>[Editorial note: Only clause and subclause number updates in this clause of the TS].</p>
<h2 id="9-statements-stmtstmt">9 Statements [stmt.stmt]</h2>
<h3 id="954-the-range-based-for-statement-stmtranged">9.5.4 The range-based <code>for</code> statement [stmt.ranged]</h3>
<p>Update paragraph 1 of subclause 9.5.4 of the TS to match the structure of the same paragraph in the C++17 standard.</p>
<p>1 The range-based <code>for</code> statement</p>
<p><code>for</code> <ins>co_await<sub>opt</sub></ins>( <em>for-range-declaration</em> : <em>for-range-initializer</em> ) <em>statement</em></p>
<p>is equivalent to</p>
<p>{<br>
    <code>auto</code> &amp;&amp;<em>__range</em> = <em>for-range-initializer</em> ;<br>
    <code>auto</code> <em>__begin</em> = <ins>co_await<sub>opt</sub></ins> <em>begin-expr</em> ;<br>
    <code>auto</code> <em>__end</em> = <em>end-expr</em> ;<br>
    <code>for</code> ( ; <em>__begin</em> != <em>__end</em>; <ins>co_await<sub>opt</sub></ins> ++<em>__begin</em> ) {<br>
      <em>for-range-declaration</em> = *<em>__begin</em>;<br>
      <em>statement</em> <br>
    } <br>
}</p>
<p>where</p>
<p><ins>(1.1) — <code>co_await</code> is present if and only if it appears immediately after the <code>for</code> keyword;</ins></p>
<p>(1.2) ...
[Editorial note: with remaining bullets appropriately renumbered].</p>
<h3 id="9631-the-coreturn-statement-stmtreturncoroutine">9.6.3.1 The <code>co_return</code> statement [stmt.return.coroutine]</h3>
<p>Update <em>coroutine-return-statement</em> production in section 9.6.3.1 of the TS as follows:</p>
<p><em>coroutine-return-statement</em>: <br>
    <del><code>co_return</code> <em>expression<sub>opt</sub></em></del><br>
    <del><code>co_return</code> <em>braced-init-list</em></del> <br>
    <ins><code>co_return</code> <em>expr-or-braced-init-list<sub>opt</sub></em></ins><br></p>
<p>Update paragraph 2 in section 9.6.3.1 of the TS as follows:</p>
<p>2 The <del><em>expression</em> or <em>braced-init-list</em></del> <ins><em>expr-or-braced-init-list</em></ins> of a <code>co_return</code> statement is called its operand.</p>
<p>...</p>
<p>where <em>final_suspend</em> is as defined in 11.4.4 and <em>S</em> is defined as follows:</p>
<p><del>(2.1) -- S is p.return_value(braced-init-list), if the operand is a braced-init-list;</del></p>
<p><del>(2.2) -- S is p.return_value(expression), if the operand is an expression of non-void type;</del></p>
<p><ins>(2.1) - <em>S</em> is <code>p.return_value(</code><em>expr-or-braced-init-list</em><code>)</code>, if the operand is a <em>braced-init-list</em> or an expression of non-<code>void</code> type</ins>;</p>
<p>(2.<ins>2</ins><del>3</del>) <em>S</em> is <code>{</code> <em>expression</em><sub>opt</sub> ; <code>p.return_void();</code> <code>}</code>, otherwise;</p>
<h2 id="10-declarations-dcldcl">10 Declarations [dcl.dcl]</h2>
<p>[Editorial note: Only clause and subclause number updates in this clause of the TS].</p>
<h2 id="11-declarators-dcldecl">11 Declarators [dcl.decl]</h2>
<p>[Editorial note: Only clause and subclause number updates in this clause of the TS].</p>
<h2 id="12-classes-class">12 Classes [class]</h2>
<p>No changes are made to this Clause of the C++ Standard</p>
<h2 id="13-derived-classes-classderived">13 Derived classes [class.derived]</h2>
<p>No changes are made to this Clause of the C++ Standard</p>
<h2 id="14-derived-classes-classderived">14 Derived classes [class.derived]</h2>
<p>No changes are made to this Clause of the C++ Standard</p>
<h2 id="15-special-member-functions-special">15 Special member functions [special]</h2>
<p>Replace reference to paragraph 31 of subclause of 12.8 [class.copy/C++14] with a reference to paragraph 1 of 15.8.3 [class.copy.elision].</p>
<blockquote>
<p>Add new <del>paragraph after paragraph 31</del> <ins>bullet to paragraph 1</ins>.</p>
</blockquote>
<blockquote>
<blockquote>
<p>(1.4) in a coroutine (11.4.4), a copy of a coroutine parameter can be omitted and references to that copy replaced with references to the corresponding parameter if the meaning of the
program will be unchanged except for the execution of a constructor and destructor for the
parameter copy object</p>
</blockquote>
</blockquote>
<p>Replace reference to paragraph 33 of subclause of 12.8 [class.copy/C++14] with a reference to paragraph 3 of 15.8.3 [class.copy.elision].</p>
<blockquote>
<p>Modify paragraph <del>33</del><ins>3</ins> as follows:</p>
</blockquote>
<blockquote>
<blockquote>
<p>3 In the following copy-initialization contexts, a move operation might be used instead of a copy operation: <br><br>
(3.1) — If the expression in a <code>return</code> statement (9.6.3) <ins>or <code>co_return</code> (9.6.3.1)</ins> is a (possibly parenthesized) id-expression that names
an object with automatic storage duration declared in the body or parameter-declaration-clause of the
innermost enclosing function or lambda-expression, or<br><br>
(3.2) — if the operand of a throw-expression (8.17) is the name of a non-volatile automatic object (other than
a function or catch-clause parameter) whose scope does not extend beyond the end of the innermost
enclosing try-block (if there is one),<br><br>
overload resolution to select the constructor for the copy <ins>or the <code>return_value</code> overload to call</ins> is first performed as if the object were designated
by an rvalue. If the first overload resolution fails or was not performed, or if the type of the first parameter
of the selected constructor <ins>or <code>return_value</code> overload</ins> is not an rvalue reference to the object’s type (possibly cv-qualified), overload
resolution is performed again, considering the object as an lvalue. [ Note: This two-stage overload resolution
must be performed regardless of whether copy elision will occur. It determines the constructor <ins>or <code>return_value</code> overload</ins> to be called if
elision is not performed, and the selected constructor <ins>or <code>return_value</code> overload</ins> must be accessible even if the call is elided. —end
note ]</p>
</blockquote>
</blockquote>
<h2 id="16-overloading-over">16 Overloading [over]</h2>
<p>[Editorial note: Only clause and subclause number updates in this clause of the TS].</p>
<h2 id="17-templates-temp">17 Templates [temp]</h2>
<p>No changes are made to this Clause of the C++ Standard</p>
<h2 id="18-exception-handling-except">18 Exception handling [except]</h2>
<p>No changes are made to this Clause of the C++ Standard</p>
<h2 id="19-preprocessing-directives-cpp">19 Preprocessing directives [cpp]</h2>
<p>No changes are made to this Clause of the C++ Standard</p>
<h2 id="20-library-introduction-library">20 Library Introduction [library]</h2>
<p>[Editorial note: Only clause, table number and subclause number updates in this clause of the TS].</p>
<h2 id="21-language-support-library-languagesupport">21 Language support library [language.support]</h2>
<h3 id="211127-hash-support-coroutinehandlehash">21.11.2.7 Hash support [coroutine.handle.hash]</h3>
<p>Update paragraph 1 to match the style used for <code>hash</code> specializations in C++17.</p>
<p><code>template &lt;class P&gt; struct hash&lt;experimental::coroutine_handle&lt;P&gt;&gt;;</code><br>
<del>1 The template specialization shall meet the requirements of class template hash (20.9.12).</del><br>
<ins>1 The specialization is enabled (23.14.15).</p>

    </body>
    </html>