Created on 2000-08-02.00:00:00 last changed 196 months ago
[Moved to DR at 4/01 meeting.]
Proposed resolution (04/01):
In 6.5.4 [basic.lookup.argdep] paragraph 2, change
If the ordinary unqualified lookup of the name finds the declaration of a class member function, the associated namespaces and classes are not considered.
to
If the ordinary unqualified lookup of the name finds the declaration of a class member function, or a block-scope function declaration that is not a using-declaration, the associated namespaces and classes are not considered.
and change the example to:
namespace NS { class T { }; void f(T); void g(T, int); } NS::T parm; void g(NS::T, float); int main() { f(parm); // OK: calls NS::f extern void g(NS::T, float); g(parm, 1); // OK: calls g(NS::T, float) }
In 12.2.2.2.2 [over.call.func] paragraph 3 from:
If the name resolves to a non-member function declaration, that function and its overloaded declarations constitute the set of candidate functions.
to
If the name resolves to a set of non-member function declarations, that set of functions constitutes the set of candidate functions.
Note that this text is also edited by issue 364. Also, remove the associated footnote 116.
Because of the usual name hiding rules, these will be introduced by declarations or by using-directives all found in the same block or all found at namespace scope.
At least in terms of the current state of the Standard, this is not correct: a block extern declaration does not prevent Koenig lookup from occurring. For example,
enum E { zero }; void f(E); void g() { void f(int); f(zero); }
In this example, the overload set will include declarations from both namespace and block scope.
(See also issue 12.)
History | |||
---|---|---|---|
Date | User | Action | Args |
2008-10-05 00:00:00 | admin | set | status: wp -> cd1 |
2003-04-25 00:00:00 | admin | set | status: dr -> wp |
2002-05-10 00:00:00 | admin | set | messages: + msg687 |
2001-05-20 00:00:00 | admin | set | status: ready -> dr |
2000-11-18 00:00:00 | admin | set | messages: + msg401 |
2000-11-18 00:00:00 | admin | set | status: open -> ready |
2000-08-02 00:00:00 | admin | create |