From: David Abrahams (dave_at_[hidden])
Date: 2005-09-09 17:29:54
"Robert Ramey" <ramey_at_[hidden]> writes:
> David Abrahams wrote:
>>> 14.6.4 Dependent name resolution [temp.dep.res]
>>> In resolving dependent names, names from the following sources
>>> are considered:
>>> - Declarations that are visible at the point of definition of the
>>> - Declarations from namespaces associated with the types of the
>>> function arguments both from the instantiation context
>>> (18.104.22.168) and from the definition context.
> To be honest, I'm still trying to parse this last sentence.
I'm almost positive you already know this, but the last bullet is not
a sentence, so if you're trying to parse it as one it will be a
Which part are you having trouble with?
The phrase "namespaces associated with the types of the function
arguments" refers to those "associated namespaces" mentioned in the
section on argument dependent lookup. "The instantiation context"
refers to the group of declarations that have been seen at the point
where the template is instantiated. "The definition context" refers
to the delarations that have been seen at the point where the template
The second bullet clearly doesn't allow the compiler to consider any
additional declarations from namespaces that aren't associated with
the function arguments. The first bullet clearly doesn't allow the
compiler to consider any additional declarations after the point of
definition. This all seems pretty obvious to me. Of course, I have
the benefit of having had it all explained to me by Steve Adamczyk of
EDG, who chairs the C++ core working group, so I can understand why it
would seem a little less obvious to you. What I can't understand is
the deep skepticism you seem to have about what I'm telling you.
-- 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