Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-10-29 10:41:08


From: "Jim.Hyslop" <jim.hyslop_at_[hidden]>
> Peter Dimov [SMTP:pdimov_at_[hidden]] wrote:
> > The problem is that an "unqualified name" doesn't refer to
unqualified-id
> > (as per the grammar) AFAICS.
> Oh, right, of course <smacks forehead>.
>
> Just to make sure I'm on the same wavelength, and to recap our position,
if
> we have:
>
> namespace N
> {
> int nInt;
> template void f<T>() { /* whatever */ }
> }
>
> { // some scope
> N::nInt x;
> f<int>(x);
> }
>
> your argument is that "f<int>" does not qualify as a "name" by the
> definitions of 3/4 and 2.10 therefore argument dependent lookup does not
> apply.

Yes.

This state of affairs makes sense to me, since if we adopt the other
alternative, that f<int> is allowed, parsing the construct:

identifier '<' expression

would be much more complicated. Exactly how complicated I don't know. :-)

--
Peter Dimov
Multi Media Ltd.

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk