cplusplus / cplusplus/draft

[expr.prim.id.unqual] What id-expression denotes a destructor? CWG2738

Open
#5,449 5 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.