Boost logo

Boost Users :

From: Arkadiy Vertleyb (vertleyb_at_[hidden])
Date: 2005-03-02 17:22:46


"Jonathan Turkanis" <technews_at_[hidden]> wrote
> Arkadiy Vertleyb wrote:
>
> > The GCC's ADL is sure broken, but this only shows up in combination
> > with another problem -- unqualified calls. Just fixing ADL would not
> > solve the problem -- MPL is free to have a *function* called end().
> > In this particular case the Boost.Range needs to be fixed to avoid
> > unqualified calls, IMO.
>
> I believe Thorsten deliberately wanted to allow unqualified calls.

I think this might have to be re-considered :-(

If one has a function template, it's not possible to tell which types of
parameters will be used. That means it's not possible to tell in which
namespaces the name is going to be looked up. This means it's not possible
to guarantee that ADL will not find another function with the same name and
signature.

Therefore, unqualified calls to function templates *should never be used*,
IMO.

I know that GCC people have admitted it, and are fixing all unqualified
calls in their STL.

Regards,
Arkadiy


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net