File tree Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Expand file tree Collapse file tree 1 file changed +61
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?xml version =' 1.0' encoding =' utf-8' standalone =' no' ?>
2
+ <!DOCTYPE issue SYSTEM "lwg-issue.dtd">
3
+
4
+ <issue num =" 4317" status =" New" >
5
+ <title >The meaning of "resource" in the <i >Cpp17Destructible</i > requirements is undefined</title >
6
+ <section >
7
+ <sref ref =" [utility.arg.requirements]" />
8
+ </section >
9
+ <submitter >Jiang An</submitter >
10
+ <date >15 Aug 2025</date >
11
+ <priority >99</priority >
12
+
13
+ <discussion >
14
+ <p >
15
+ The meaning of "resource" in the <i >Cpp17Destructible</i > requirements cannot be inferred
16
+ from the standard wording and it seems unlikely that the standard will determine its meaning
17
+ in the future. What are considered as resources generally depends on users' intent, so the
18
+ standard shouldn't determine the well-definedness of a program execution due to it. Moreover,
19
+ the wording doesn't seem to consider shared ownership, which can be represented by `shared_ptr`.
20
+ </p >
21
+ </discussion >
22
+
23
+ <resolution >
24
+ <p >
25
+ This wording is relative to <paper num =" N5014" />.
26
+ </p >
27
+
28
+ <ol >
29
+
30
+ <li ><p >Modify <sref ref =" [utility.arg.requirements]" />, Table 35 [tab:cpp17.destructible] as indicated:</p >
31
+
32
+ <blockquote >
33
+ <table border =" 1" >
34
+ <caption >Table 35 — <tt >Cpp17Destructible</tt > requirements [tab:cpp17.destructible]</caption >
35
+ <tr >
36
+ <th >Expression</th >
37
+ <th >Post-condition</th >
38
+ </tr >
39
+ <tr >
40
+ <td >
41
+ <tt >u.~T()</tt >
42
+ </td >
43
+ <td >
44
+ <del >All resources owned by `u` are reclaimed, n</del ><ins >N</ins >o exception is propagated.
45
+ </td >
46
+ </tr >
47
+ <tr >
48
+ <td colspan =" 2" >
49
+ [<i >Note 3:</i > Array types and non-object types are not <i >Cpp17Destructible</i >. — <i >end note</i >]
50
+ </td >
51
+ </tr >
52
+ </table >
53
+
54
+ </blockquote >
55
+
56
+ </li >
57
+
58
+ </ol >
59
+ </resolution >
60
+
61
+ </issue >
You can’t perform that action at this time.
0 commit comments