Created on 2024-08-16.00:00:00 last changed 6 days ago
Additional notes (September, 2024)
The proposed wording appears to make the following example unintentionally well-formed:
int n; using T = int; int m = T::n;
Proposed resolution (approved by CWG 2024-09-13):
Change in 6.5.5.1 [basic.lookup.qual.general] paragraph 3 as follows:
Qualified name lookup in a class, namespace, or enumeration performs a search of the scope associated with it (6.5.2 [class.member.lookup]) except as specified below. Unless otherwise specified, a qualified name undergoes qualified name lookup in its lookup context from the point where it appears unless the lookup contexteitherIf nothing is found by qualified lookup for a member-qualified name that is the terminal name (7.5.5.2 [expr.prim.id.unqual]) of a nested-name-specifier and is not dependent, it undergoes unqualified lookup.
- is dependent and is not the current instantiation (13.8.3.2 [temp.dep.type]), in which case the lookup is done from the point of instantiation (13.8.4.1 [temp.point]), or
- is
not a class or class templatea type that is neither a class nor an enumeration, in which case unqualified lookup is performed. [ Note: Such a qualified name can be used to name a destructor (7.5.5.5 [expr.prim.id.dtor]). -- end note ]
(From submission #599.)
Consider:
template <typename U> constexpr bool foo = U::b; template <class T> struct A { A() requires(foo<A>) {} static constexpr bool b = true; }; A<int> a;
All implementation accept, but there is no normative wording prescribing the lookup context for U::b.
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-09-27 20:34:22 | admin | set | messages: + msg7823 |
2024-09-27 20:34:22 | admin | set | status: tentatively ready -> open |
2024-09-25 17:32:08 | admin | set | status: open -> tentatively ready |
2024-08-16 14:39:18 | admin | set | messages: + msg7794 |
2024-08-16 00:00:00 | admin | create |