This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of New status.
4317. The meaning of "resource" in the Cpp17Destructible requirements is undefinedSection: 16.4.4.2 [utility.arg.requirements] Status: New Submitter: Jiang An Opened: 2025-08-15 Last modified: 2025-08-17
Priority: Not Prioritized
View other active issues in [utility.arg.requirements].
View all other issues in [utility.arg.requirements].
View all issues with New status.
Discussion:
The meaning of "resource" in the Cpp17Destructible requirements cannot be inferred from the standard wording and it seems unlikely that the standard will determine its meaning in the future. What are considered as resources generally depends on users' intent, so the standard shouldn't determine the well-definedness of a program execution due to it. Moreover, the wording doesn't seem to consider shared ownership, which can be represented by shared_ptr
.
Proposed resolution:
This wording is relative to N5014.
Modify 16.4.4.2 [utility.arg.requirements], Table 35 [tab:cpp17.destructible] as indicated:
Table 35 —Cpp17Destructible
requirements [tab:cpp17.destructible] Expression Post-conditionu.~T()
All resources owned byu
are reclaimed, n No exception is propagated. [Note 3: Array types and non-object types are not Cpp17Destructible. — end note]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4