Created on 1999-09-03.00:00:00 last changed 274 months ago
Proposed Resolution (10/00):
Immediately preceding the example at the end of 6.5.4 [basic.lookup.argdep] paragraph 2, add the following:
[Note: the namespaces and classes associated with the argument types can include namespaces and classes already considered by the ordinary unqualified lookup.]
The description of Koenig lookup in 6.5.4 [basic.lookup.argdep] paragraph 1 says,
...other namespaces not considered during the usual unqualified lookup (6.5.3 [basic.lookup.unqual] ) may be searched.Does this mean that Koenig lookup does not search namespaces that were already searched during the usual unqualified lookup? The answer is academic except for the two-stage lookup during template instantiation. If a given namespace is searched in the context of the template definition, are declarations in that namespace in the instantiation context ignored during the Koenig lookup? For instance,
void f(int);
template <class T> void g(T t) {
f(t);
}
enum E { e };
void f(E);
void h() {
g(e);
}
In this example, the call f(t) in the template function will
resolve to f(E) if Koenig lookup reexamines already-searched
namespaces and to f(int) if not.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2003-04-25 00:00:00 | admin | set | status: dr -> tc1 |
| 2000-11-18 00:00:00 | admin | set | status: ready -> dr |
| 2000-05-21 00:00:00 | admin | set | status: review -> ready |
| 2000-02-23 00:00:00 | admin | set | messages: + msg215 |
| 2000-02-23 00:00:00 | admin | set | status: open -> review |
| 1999-09-03 00:00:00 | admin | create | |