This is the mail archive of the
mailing list for the GCC project.
Re: [wwwdocs PATCH] Document friend changes in gcc-4.0/changes.html
Mark Mitchell wrote:
OK; I did not intend to change the meaning. But, I do not find your
wording clear. How about "When declaring a friend class using an
unqualified name, if name-lookup does not find the friend class, the
friend declaration is considered to be a forward declaration of a member
class, rather than a class in the containing namespace."?
Hmm, the entry is about where to do name-lookup for an existing name,
not where to put an undeclared name. So I am proposing this version:
"When declaring a friend class using an unqualified name,
classes outside the innermost non-class scope are not searched."
I have some quotes from the standard at the end of this mail for
OK with this change?
Quotes from the standard:
When looking for prior declaration of a class or a function declared
as friend, scopes outside the innermost enclosing namespace scope are
If a friend declaration appears in a local class (9.8) and the name
specified is an unqualified name, a prior declaration is looked up
without considering scopes that are outside the innermost enclosing