Open xmh0511 opened 2 years ago
The note is in [expr.prim.id.unqual] p1
The note is in [expr.prim.id.unqual] p1
We expect a formal rule to clarify that an id-expression denotes a destructor. BTW, I cited the note in this issue.
It seems that we can just turn the note into a formal rule as-is.
The note sounds good but it is not formal since the "so named" has no clear definition. I would prefer to use
A type-name or decltype-specifier prefixed by ~ denotes the destructor of the type denoted/referred to by it([basic.lookup], [dcl.type.decltype]).
The note in [expr.prim.id.unqual]/1 suggests that [expr.prim.id.dtor] covers this (which might be why I missed it for P1787), but in fact the latter relies on "denotes the destructor" rather than defining it. This should perhaps be treated as a separate issue.
The separated issue as pointed out in https://github.com/cplusplus/draft/issues/5346#issuecomment-1072949401
In the current draft, we merely have a note that says
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.
Maybe, we should have a formal rule like that: