Skip to content

Commit cdc8f5d

Browse files
committed
[NFC] dr -> cwg, reword ReleaseNotes
1 parent db3ee6a commit cdc8f5d

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,11 @@ Resolutions to C++ Defect Reports
258258
a single element of the same type instead of always copying.
259259
(`CWG2137: List-initialization from object of same type <https://cplusplus.github.io/CWG/issues/2137.html>`)
260260

261-
- Implemented `CWG2311 <https://wg21.link/CWG2311>`_: given a prvalue ``e`` of object type
262-
``T``, ``T{e}`` will try to resolve an initializer list constructor and will use it if successful (CWG2137).
261+
- Speculative resolution for CWG2311 implemented so that the implementation of CWG2137 doesn't remove
262+
previous cases where guaranteed copy elision was done. Given a prvalue ``e`` of class type
263+
``T``, ``T{e}`` will try to resolve an initializer list constructor and will use it if successful.
263264
Otherwise, if there is no initializer list constructor, the copy will be elided as if it was ``T(e)``.
265+
(`CWG2311: Missed case for guaranteed copy elision <https://cplusplus.github.io/CWG/issues/2311.html>`)
264266

265267
C Language Changes
266268
------------------

clang/test/CXX/drs/cwg23xx.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ struct Z : W,
104104
// cwg2331: na
105105
// cwg2335 is in cwg2335.cxx
106106

107-
namespace dr2311 { // dr2311: 18 open
107+
namespace cwg2311 { // cwg2311 is open with no proposed resolution
108108
#if __cplusplus >= 201707L
109109
template<typename T>
110110
void test() {
@@ -170,12 +170,12 @@ struct any {
170170
template<typename T>
171171
struct X {
172172
X();
173-
X(T) = delete; // #dr2311-X
173+
X(T) = delete; // #cwg2311-X
174174
};
175175

176176
X<std::initializer_list<any>> x{ X<std::initializer_list<any>>() };
177177
// since-cxx17-error@-1 {{call to deleted constructor of 'X<std::initializer_list<any>>'}}
178-
// since-cxx17-note@#dr2311-X {{'X' has been explicitly marked deleted here}}
178+
// since-cxx17-note@#cwg2311-X {{'X' has been explicitly marked deleted here}}
179179
#endif
180180
}
181181

clang/www/cxx_dr_status.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13674,7 +13674,7 @@ <h2 id="cxxdr">C++ defect report implementation status</h2>
1367413674
<td><a href="https://cplusplus.github.io/CWG/issues/2311.html">2311</a></td>
1367513675
<td>open</td>
1367613676
<td>Missed case for guaranteed copy elision</td>
13677-
<td class="unreleased" align="center">Clang 18</td>
13677+
<td align="center">Not resolved</td>
1367813678
</tr>
1367913679
<tr id="2312">
1368013680
<td><a href="https://cplusplus.github.io/CWG/issues/2312.html">2312</a></td>

0 commit comments

Comments
 (0)