[basic.life][class.dtor] Seemingly redundant normative specification for undefined behavior about double destruction
Open
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
[basic.life]/9 and [class.dtor]/18 seem to be normatively redundant, because
- [basic.life]/1.4 already specifies that a destructor call ends the lifetime of a class object, and
- [basic.life]/6.2 and [basic.life]/7.2 already specifies that calling a non-static member function, including destructor, for an out-of-lifetime object is undefined behavior.
Originally discovered by @sergey-anisimov-dev in https://github.com/cplusplus/CWG/issues/361#issuecomment-1634583516.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare [basic.life]/1.4, /6.2, /7.2, and /9 with [class.dtor]/18, starting from the linked standard clauses and the discussion in CWG issue 361. Determine whether the double-destruction wording is genuinely redundant and document the agreed resolution; done means the normative text and issue discussion no longer contain unresolved duplication.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100