[expr.prim.id.unqual] What id-expression denotes a destructor? CWG2738
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
In the current draft, we merely have a note that says
A type-name or decltype-specifier prefixed by ~ denotes the destructor of the type so named; see [expr.prim.id.dtor].
The note cross-references [expr.prim.id.dtor], however, in that subclause, we still cannot find a rule to specifies what id-expression denotes a destructor.
An id-expression that denotes the destructor of a type T names the destructor of T if T is a class type ([class.dtor]), otherwise the id-expression is said to name a pseudo-destructor.
Maybe, we should have a formal rule like that:
An unqualified-id with the form ~type-name or ~decltype-specifier denotes the destructor of a type denoted by the type-name or decltype-specifier([basic.lookup.qual.general]).
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
Start by comparing the current wording in [expr.prim.id.unqual] with the referenced [expr.prim.id.dtor] subclause. Check how existing rules define destructor-denoting id-expressions and whether the proposed rule fits the surrounding terminology; done means the standard draft states the missing rule consistently and the cross-reference is accurate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100