Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-10-29 10:15:27


From: "Jim.Hyslop" <jim.hyslop_at_[hidden]>
> Peter Dimov [SMTP:pdimov_at_[hidden]] wrote:
> > From: "Jens Maurer" <Jens.Maurer_at_[hidden]>
> > > Whatever Comeau does, I believe it should invoke Koenig lookup
> > > for code like this:
> > >
> > > f<int>(x);
> >
> > ... I don't agree here. "the postfix-expression" here is "f<int>", which
> is
> > not, I think, an "unqualified name." It's a template-id. So, by this
> > interpretation, 3.4.2 doesn't allow argument dependent lookup to occur.
>
> According to the grammar at the beginning of 5.1, an unqualified-id
consists
> of (among other possibilities) a template-id, so 3.4.2 should allow
argument
> dependent lookup, when 5.1/11 is removed (per DR 122). Or have I missed
> something?

The problem is that an "unqualified name" doesn't refer to unqualified-id
(as per the grammar) AFAICS.

3/4: "A name is an identifier (2.10) that denotes an entity or label."
2.10: "An identifier is an arbitrarily long sequence of letters and digits."

So, in the example above, 'f<int>' - the postfix-expression - is an
unqualified-id, but not a name. 'f' is a name (of a template.)

That's my interpretation, of course.

--
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