|
Boost : |
From: Aleksey Gurtovoy (alexy_at_[hidden])
Date: 2001-07-30 09:41:17
Peter Dimov wrote:
> True, but you can make it visible with an 'using' directive,
> causing an ambiguity:
>
> namespace N
> {
> struct f {};
> }
>
> void f(int);
>
> using namespace N;
>
> int main()
> {
> f(1);
> }
>
> So if #218 alters the Koenig lookup to apply to names (for
> consistency), non-functions would cause an ambiguity
> regardless of whether they have the right "signature"
> (assuming that they can handle operator() at all.)
They would not :), see 3.4.2 [basic.lookup.koenig] para 3:
3 When considering an associated namespace, the lookup is the same as the
lookup performed when the associated namespace is used as a qualifier
(3.4.3.2) except that:
- Any using directives in the associated namespace are ignored.
- ...
>
> Any proposal that features unqualified calls is affected by
> this issue.
In any case, may be I am full of FUD too, but I feel a little bit
uncomfortable about applying the technique that is based on so subtle
details of the language.
Aleksey
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk