|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2001-10-29 04:46:06
From: "Jens Maurer" <Jens.Maurer_at_[hidden]>
> Peter Dimov wrote:
> > The problem is not whether the set of associated namespaces contains
> > 'boost'; the problem is whether an expression of the form
> >
> > template-id ( expression-list opt )
> >
> > will invoke Koenig lookup.
> >
> > 3.4.2 says: "when an unqualified name is used as the posfix-expression
in a
> > function call (5.2.2)...". 5.2.2 doesn't tell us anything useful, but
5.1/11
> > has this to say: "A template-id shall be used as an unqualified-id only
as
> > specified in 14.7.2, 14.7, and 14.5.4.)
>
> The quoted sentence in 5.1/11 has been removed in core issue 122.
[...]
Thank you for the reference, it wasn't exactly clear (to me) what the
sentence was supposed to mean anyway; however, ...
> 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.
If the committee intent is that argument-dependent lookup should occur in
such expressions, we probably need another DR.
Of course, parsing C++ will become even more fun than it's now. :-)
-- 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