From: David Abrahams (dave_at_[hidden])
Date: 2005-04-06 18:49:09
"Thorsten Ottosen" <nesotto_at_[hidden]> writes:
> "David Abrahams" <dave_at_[hidden]> wrote in message
> | "Thorsten Ottosen" <nesotto_at_[hidden]> writes:
> | > | What is "the ADL lookup problem?"
> | >
> | > the problem that emerges when you want ADL to happen, but
> | > cannot use an unqualified call because it would create conflicts
> | > between
> | >
> | > boost::begin;
> | > sequence::begin
> | > foo::begin
> | You have to consider that problem in the context of the question, "how
> | likely is it that there will be no best match among those three?"
> just consider that all of the begin()'s may have an unconstrained
> primary template version. all three is going to match.
How likely is that? It doesn't seem bery likely to me. foo::begin
will almost certainly be more specific.
I don't think you mean "primary template," do you? You're not talking
about using function template specialization are you?
> | > it could fairly easily happen IMO. more and more code is put into
> | > header files qualified syntax hence becomes more important
> | Show me a realistic example, please. I am still in the early stages
> | and can change this element of the design if necessary.
> please consider the example above.
Doesn't seem particularly realistic.
> | > I recall it as it was the costumization points that a framework
> | > ceases to own.
> | The customization points and their expected semantics are what make up
> | the Range concept's requirements.
> | > begin() is a bad customization point
> | I'm not sure of that anymore. Conflicts caused by GCC can be
> | misleading. And now that we know how to properly isolate types
> you mean by namespaces?
> | to prevent unintended ADL, I think it's even less of a problem.
> IMO there is no such thing as unintended ADL during a call to
> boost::begin(). you always want it.
By "unintended ADL" I mean what happens when the author of the begin()
function that ends up getting called never intended it to be found via
ADL for that particular argument type. I suppose I should have
written "unintended argument-dependent matching" or something.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk