Closed ranaanoop closed 3 months ago
Why do you believe this is a type-only context? Your situation doesn't fit any of the categories in [temp.res.general] p4.
Why do you believe this is a type-only context?
@jensmaurer Because the qualified name x
is the terminal name of nested-name-specifier. So as per temp.res.general#4.1, this is type-only context.
The T::x
in your example is not a nested-name-specifier, it's a qualified-id whose nested-name-specifier is T::
.
A nested-name-specifier always ends with ::
; see [expr.prim.id.qual] before p1.
Full name of submitter: Anoop Rana
Reference (section label): [temp.res.general]
Issue description:
Currently, temp.res.general says:
The highlightted part(in bold) quoted above seems to imply that
T::x
is considered to denote a type. This means thatT::x *i;
should be a declaration not an expression as per the first part of quoted reference. But the comment in the example code says otherwise.